Changeset ab87db5 in mainline for abi/include/abi/cap.h


Ignore:
Timestamp:
2019-02-23T17:16:01Z (5 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c193d83, ca0e838
Parents:
bc417660 (diff), 95a47b0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-23 17:16:01)
git-committer:
GitHub <noreply@…> (2019-02-23 17:16:01)
Message:

Merge pull request #157

Turn some function-like macros into functions

File:
1 edited

Legend:

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

    rbc417660 rab87db5  
    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.