RubySlicc_Util.hh (6467:5670eee2a866) | RubySlicc_Util.hh (6493:1fa51760a963) |
---|---|
1 2/* 3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 92 unchanged lines hidden (view full) --- 101 return nodenum; 102} 103 104extern inline int addressToInt(Address addr) 105{ 106 return (int) addr.getLineAddress(); 107} 108 | 1 2/* 3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 92 unchanged lines hidden (view full) --- 101 return nodenum; 102} 103 104extern inline int addressToInt(Address addr) 105{ 106 return (int) addr.getLineAddress(); 107} 108 |
109extern inline int MessageSizeTypeToInt(MessageSizeType size_type) 110{ 111 return MessageSizeType_to_int(size_type); 112} 113 | |
114extern inline bool long_enough_ago(Time event) 115{ 116 return ((get_time() - event) > 200); 117} 118 119extern inline int getAddThenMod(int addend1, int addend2, int modulus) 120{ 121 return (addend1 + addend2) % modulus; --- 46 unchanged lines hidden (view full) --- 168// Makes an address into a line address 169extern inline Address makeLineAddress(Address addr) 170{ 171 Address result = addr; 172 result.makeLineAddress(); 173 return result; 174} 175 | 109extern inline bool long_enough_ago(Time event) 110{ 111 return ((get_time() - event) > 200); 112} 113 114extern inline int getAddThenMod(int addend1, int addend2, int modulus) 115{ 116 return (addend1 + addend2) % modulus; --- 46 unchanged lines hidden (view full) --- 163// Makes an address into a line address 164extern inline Address makeLineAddress(Address addr) 165{ 166 Address result = addr; 167 result.makeLineAddress(); 168 return result; 169} 170 |
176extern inline int addressOffset(Address addr) 177{ 178 return addr.getOffset(); 179} 180 | |
181#endif //SLICC_UTIL_H | 171#endif //SLICC_UTIL_H |