123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #ifndef __SMCINVOKE_OBJECT_H
- #define __SMCINVOKE_OBJECT_H
- #include <linux/types.h>
- #define object_op_METHOD_MASK ((uint32_t)0x0000FFFFu)
- #define object_op_RELEASE (object_op_METHOD_MASK - 0)
- #define object_op_RETAIN (object_op_METHOD_MASK - 1)
- #define object_counts_max_BI 0xF
- #define object_counts_max_BO 0xF
- #define object_counts_max_OI 0xF
- #define object_counts_max_OO 0xF
- #define object_counts_num_BI(k) ((size_t) (((k) >> 0) & object_counts_max_BI))
- #define object_counts_num_BO(k) ((size_t) (((k) >> 4) & object_counts_max_BO))
- #define object_counts_num_OI(k) ((size_t) (((k) >> 8) & object_counts_max_OI))
- #define object_counts_num_OO(k) ((size_t) (((k) >> 12) & object_counts_max_OO))
- #define object_counts_num_buffers(k) \
- (object_counts_num_BI(k) + object_counts_num_BO(k))
- #define object_counts_num_objects(k) \
- (object_counts_num_OI(k) + object_counts_num_OO(k))
- #define object_counts_index_BI(k) 0
- #define object_counts_index_BO(k) \
- (object_counts_index_BI(k) + object_counts_num_BI(k))
- #define object_counts_index_OI(k) \
- (object_counts_index_BO(k) + object_counts_num_BO(k))
- #define object_counts_index_OO(k) \
- (object_counts_index_OI(k) + object_counts_num_OI(k))
- #define object_counts_total(k) \
- (object_counts_index_OO(k) + object_counts_num_OO(k))
- #endif
|