Ruby: expose a simple mod function in slicc interface.
This commit is contained in:
parent
3a44307e94
commit
556b5c5488
2 changed files with 7 additions and 1 deletions
|
@ -55,4 +55,4 @@ bool distributedPersistentEnabled();
|
|||
Address setOffset(Address addr, int offset);
|
||||
Address makeLineAddress(Address addr);
|
||||
int addressOffset(Address addr);
|
||||
|
||||
int mod(int val, int mod);
|
||||
|
|
|
@ -182,4 +182,10 @@ addressOffset(Address addr)
|
|||
return addr.getOffset();
|
||||
}
|
||||
|
||||
inline int
|
||||
mod(int val, int mod)
|
||||
{
|
||||
return val % mod;
|
||||
}
|
||||
|
||||
#endif // __MEM_RUBY_SLICC_INTERFACE_RUBYSLICCUTIL_HH__
|
||||
|
|
Loading…
Reference in a new issue