sys/kern: Add lockmgr support

- See `man lockmgr`

- Implement the lock_object and move the RTEMS mutex to that object

- Add debug support to track the locks with gdb

Update #4475
This commit is contained in:
Chris Johns
2021-07-20 16:24:54 +10:00
parent e1ca99b535
commit 46a15fa7aa
17 changed files with 727 additions and 83 deletions

View File

@@ -40,16 +40,20 @@
#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_MUTEX_H_
#define _RTEMS_BSD_MACHINE_RTEMS_BSD_MUTEX_H_
#include <rtems/score/thread.h>
#include <sys/queue.h>
#include <rtems/score/threadq.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct {
typedef struct rtems_bsd_mutex {
Thread_queue_Control queue;
int nest_level;
#if RTEMS_DEBUG
TAILQ_ENTRY(rtems_bsd_mutex) mutex_list;
#endif /* RTEMS_DEBUG */
} rtems_bsd_mutex;
#ifdef __cplusplus