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
19
include/kernel/lock.h
Normal file
19
include/kernel/lock.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _LOCK_H_
|
||||
#define _LOCK_H_
|
||||
|
||||
#include <kernel/types.h>
|
||||
#include <kernel/common.h>
|
||||
|
||||
#define CLEANUP_SLOCK CLEANUP(cleanup_spinlock)
|
||||
|
||||
typedef u32 lock_t;
|
||||
|
||||
void spin_lock(lock_t *lock);
|
||||
void spin_unlock(lock_t *lock);
|
||||
void cleanup_spinlock(lock_t **lock_ptr);
|
||||
|
||||
void mtx_lock(lock_t *l);
|
||||
void mtx_unlock(lock_t *l);
|
||||
|
||||
#endif /* _LOCK_H_ */
|
||||
Loading…
Reference in a new issue