lock: merge spinlock and mtx locks into one
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
3e5abada9b
commit
2076f1dae1
32 changed files with 158 additions and 169 deletions
|
|
@ -1,10 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _MTX_H_
|
||||
#define _MTX_H_
|
||||
|
||||
#include <kernel/spinlock.h>
|
||||
|
||||
void mtx_lock(mtx_t *l);
|
||||
void mtx_unlock(mtx_t *l);
|
||||
|
||||
#endif /* _MTX_H_ */
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _SPINLOCK_H_
|
||||
#define _SPINLOCK_H_
|
||||
|
||||
#include <kernel/types.h>
|
||||
#include <kernel/common.h>
|
||||
|
||||
#define CLEANUP_SLOCK CLEANUP(cleanup_spinlock)
|
||||
|
||||
typedef u32 spinlock_t;
|
||||
typedef spinlock_t mtx_t;
|
||||
|
||||
void spinlock_acquire(spinlock_t *lock);
|
||||
void spinlock_release(spinlock_t *lock);
|
||||
void cleanup_spinlock(spinlock_t **lock_ptr);
|
||||
|
||||
#endif /* _SPINLOCK_H_ */
|
||||
Loading…
Reference in a new issue