Skip to content

Commit

Permalink
ISGENQ wrapper fixes/improvements:
Browse files Browse the repository at this point in the history
- IS_ISGENQ_LOCK_OBTAINED macro
- Workaround for a bug in the Metal headers

Signed-off-by: Fyodor Kovin <[email protected]>
  • Loading branch information
fkovinAtRocket committed Apr 29, 2019
1 parent 618e363 commit 2a95df2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions h/crossmemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#ifdef METTLE
#include <metal/metal.h>
#include <metal/stddef.h>
#include <metal/stdlib.h>
#else
#include <stdlib.h>
Expand Down
3 changes: 3 additions & 0 deletions h/isgenq.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ int isgenqTestLock(const QName *qname,

int isgenqReleaseLock(ENQToken *token, int *reasonCode);

#define IS_ISGENQ_LOCK_OBTAINED($isgenqRC, $isgenqRSN) \
($isgenqRC <= 4 && ((unsigned)$isgenqRSN & 0xFFFF) != 0x0404)

#endif /* H_ISGENQ_H_ */


Expand Down

0 comments on commit 2a95df2

Please sign in to comment.