Deleted Added
sdiff udiff text old ( 8608:02d7ac5fb855 ) new ( 10005:8c2b0dc16ccd )
full compact
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 44 unchanged lines hidden (view full) ---

53 {MachineType_Directory, map_Address_to_DirectoryNode(addr)};
54 return mach;
55}
56
57inline NetDest
58broadcast(MachineType type)
59{
60 NetDest dest;
61 for (int i = 0; i < MachineType_base_count(type); i++) {
62 MachineID mach = {type, i};
63 dest.add(mach);
64 }
65 return dest;
66}
67
68inline MachineID
69mapAddressToRange(const Address & addr, MachineType type, int low_bit,
70 int num_bits)
71{
72 MachineID mach = {type, 0};
73 if (num_bits == 0)
74 return mach;
75 mach.num = addr.bitSelect(low_bit, low_bit + num_bits - 1);
76 return mach;
77}
78
79inline NodeID
80machineIDToNodeID(MachineID machID)
81{
82 return machID.num;
83}

--- 14 unchanged lines hidden ---