remove const from TPL_OpenTPLFromMemory since the memory is altered
[libogc.git] / libogc / lwp_states.inl
blob79ee4ecf70daaf8fb03b6f694da93c0f86ce7bb8
1 #ifndef __LWP_STATES_INL__
2 #define __LWP_STATES_INL__
4 static __inline__ u32 __lwp_setstate(u32 curr_state,u32 stateset)
6         return (curr_state|stateset);
9 static __inline__ u32 __lwp_clearstate(u32 curr_state,u32 stateclear)
11         return (curr_state&~stateclear);
14 static __inline__ u32 __lwp_stateready(u32 curr_state)
16         return (curr_state==LWP_STATES_READY);
19 static __inline__ u32 __lwp_stateonlydormant(u32 curr_state)
21         return (curr_state==LWP_STATES_DORMANT);
24 static __inline__ u32 __lwp_statedormant(u32 curr_state)
26         return (curr_state&LWP_STATES_DORMANT);
29 static __inline__ u32 __lwp_statesuspended(u32 curr_state)
31         return (curr_state&LWP_STATES_SUSPENDED);
34 static __inline__ u32 __lwp_statetransient(u32 curr_state)
36         return (curr_state&LWP_STATES_TRANSIENT);
39 static __inline__ u32 __lwp_statedelaying(u32 curr_state)
41         return (curr_state&LWP_STATES_DELAYING);
44 static __inline__ u32 __lwp_statewaitbuffer(u32 curr_state)
46         return (curr_state&LWP_STATES_WAITING_FOR_BUFFER);
49 static __inline__ u32 __lwp_statewaitsegment(u32 curr_state)
51         return (curr_state&LWP_STATES_WAITING_FOR_SEGMENT);
54 static __inline__ u32 __lwp_statewaitmessage(u32 curr_state)
56         return (curr_state&LWP_STATES_WAITING_FOR_MESSAGE);
59 static __inline__ u32 __lwp_statewaitevent(u32 curr_state)
61         return (curr_state&LWP_STATES_WAITING_FOR_EVENT);
64 static __inline__ u32 __lwp_statewaitmutex(u32 curr_state)
66         return (curr_state&LWP_STATES_WAITING_FOR_MUTEX);
69 static __inline__ u32 __lwp_statewaitsemaphore(u32 curr_state)
71         return (curr_state&LWP_STATES_WAITING_FOR_SEMAPHORE);
74 static __inline__ u32 __lwp_statewaittime(u32 curr_state)
76         return (curr_state&LWP_STATES_WAITING_FOR_TIME);
79 static __inline__ u32 __lwp_statewaitrpcreply(u32 curr_state)
81         return (curr_state&LWP_STATES_WAITING_FOR_RPCREPLAY);
84 static __inline__ u32 __lwp_statewaitperiod(u32 curr_state)
86         return (curr_state&LWP_STATES_WAITING_FOR_PERIOD);
89 static __inline__ u32 __lwp_statewaitlocallyblocked(u32 curr_state)
91         return (curr_state&LWP_STATES_LOCALLY_BLOCKED);
94 static __inline__ u32 __lwp_statewaitthreadqueue(u32 curr_state)
96         return (curr_state&LWP_STATES_WAITING_ON_THREADQ);
99 static __inline__ u32 __lwp_stateblocked(u32 curr_state)
101         return (curr_state&LWP_STATES_BLOCKED);
104 static __inline__ u32 __lwp_statesset(u32 curr_state,u32 mask)
106         return ((curr_state&mask)!=LWP_STATES_READY);
109 #endif