Skip to content

Commit bf0ef0e

Browse files
committed
add no pi flag in mutex
1 parent 9a84c13 commit bf0ef0e

File tree

2 files changed

+380
-147
lines changed

2 files changed

+380
-147
lines changed

include/rtdef.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,16 +1059,20 @@ struct rt_mutex
10591059
{
10601060
struct rt_ipc_object parent; /**< inherit from ipc_object */
10611061

1062+
/* not used in RT_MUTEX_NO_PI mutex */
10621063
rt_uint8_t ceiling_priority; /**< the priority ceiling of mutexe */
10631064
rt_uint8_t priority; /**< the maximal priority for pending thread */
1065+
10641066
rt_uint8_t hold; /**< numbers of thread hold the mutex */
1065-
rt_uint8_t reserved; /**< reserved field */
1067+
rt_uint8_t flag; /**< flag of mutex */
10661068

10671069
struct rt_thread *owner; /**< current owner of mutex */
10681070
rt_list_t taken_list; /**< the object list taken by thread */
10691071
struct rt_spinlock spinlock;
10701072
};
10711073
typedef struct rt_mutex *rt_mutex_t;
1074+
1075+
#define RT_MUTEX_NO_PI 0x02
10721076
#endif /* RT_USING_MUTEX */
10731077

10741078
/**@}*/

0 commit comments

Comments
 (0)