Changeset bb97118 in mainline for abi


Ignore:
Timestamp:
2019-02-06T13:25:12Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eb13ef8
Parents:
d066259
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-02 13:29:26)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-06 13:25:12)
Message:

Convert CAP_HANDLE_RAW and CAP_HANDLE_VALID into functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abi/include/abi/cap.h

    rd066259 rbb97118  
    3636#define ABI_CAP_H_
    3737
     38#include <stdbool.h>
     39#include <stdint.h>
     40
    3841#define CAP_NIL  0
    39 
    40 #define CAP_HANDLE_VALID(handle)  ((handle) != CAP_NIL)
    41 #define CAP_HANDLE_RAW(handle)    ((intptr_t) (handle))
    4242
    4343typedef void *cap_handle_t;
     
    5555} *cap_waitq_handle_t;
    5656
     57static inline bool cap_handle_valid(cap_handle_t handle)
     58{
     59        return handle != CAP_NIL;
     60}
     61
     62static inline intptr_t cap_handle_raw(cap_handle_t handle)
     63{
     64        return (intptr_t) handle;
     65}
     66
    5767#endif
    5868
Note: See TracChangeset for help on using the changeset viewer.