1 #ifndef __LWP_PRIORITY_INL__
2 #define __LWP_PRIORITY_INL__
4 static __inline__ void __lwp_priomap_init(prio_cntrl *theprio,u32 prio)
11 theprio->minor = &_prio_bitmap[major];
13 mask = 0x80000000>>major;
14 theprio->ready_major = mask;
15 theprio->block_major = ~mask;
17 mask = 0x80000000>>minor;
18 theprio->ready_minor = mask;
19 theprio->block_minor = ~mask;
21 printf("__lwp_priomap_init(%p,%d,%p,%d,%d,%d,%d)\n",theprio,prio,theprio->minor,theprio->ready_major,theprio->ready_minor,theprio->block_major,theprio->block_minor);
25 static __inline__ void __lwp_priomap_addto(prio_cntrl *theprio)
27 *theprio->minor |= theprio->ready_minor;
28 _prio_major_bitmap |= theprio->ready_major;
31 static __inline__ void __lwp_priomap_removefrom(prio_cntrl *theprio)
33 *theprio->minor &= theprio->block_minor;
34 if(*theprio->minor==0)
35 _prio_major_bitmap &= theprio->block_major;
38 static __inline__ u32 __lwp_priomap_highest()
41 major = cntlzw(_prio_major_bitmap);
42 minor = cntlzw(_prio_bitmap[major]);
44 printf("__lwp_priomap_highest(%d)\n",((major<<4)+minor));
46 return ((major<<4)+minor);