-struct cds_ja_inode *ja_node_ptr(struct cds_ja_inode_flag *node)
-{
- unsigned long type_index = ja_node_type(node);
- const struct cds_ja_type *type;
-
- type = &ja_types[type_index];
- switch (type->type_class) {
- case RCU_JA_LINEAR:
- case RCU_JA_PIGEON: /* fall-through */
- case RCU_JA_NULL: /* fall-through */
- default: /* fall-through */
- return _ja_node_mask_ptr(node);
- case RCU_JA_POOL:
- switch (type->nr_pool_order) {
- case 1:
- return (struct cds_ja_inode *) (((unsigned long) node) & ~(JA_POOL_1D_MASK | JA_TYPE_MASK));
- case 2:
- return (struct cds_ja_inode *) (((unsigned long) node) & ~(JA_POOL_2D_MASK | JA_POOL_1D_MASK | JA_TYPE_MASK));
- default:
- assert(0);
- }
- }
-}
-