10#include <sys/kassert.h>
11#include <sys/kconfig.h>
12#include <sys/kdebug.h>
15#include <sys/spinlock.h>
16#include <sys/semaphore.h>
17#include <sys/thread.h>
55 if (sema->
count > 0) {
92 if (sema->
count > 0) {
108 kprintf(
"%-36s Count\n",
"Lock Name");
void Sched_SetWaiting(Thread *thr)
void Thread_Release(Thread *thr)
void Sched_SetRunnable(Thread *thr)
int kprintf(const char *fmt,...)
#define REGISTER_DBGCMD(_NAME, _DESC, _FUNC)
#define TAILQ_FOREACH(var, head, field)
#define LIST_REMOVE(elm, field)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define LIST_HEAD_INITIALIZER(head)
#define TAILQ_FIRST(head)
#define TAILQ_REMOVE(head, elm, field)
#define LIST_FOREACH(var, head, field)
#define LIST_INSERT_HEAD(head, elm, field)
#define LIST_HEAD(name, type)
void Semaphore_Release(Semaphore *sema)
void Debug_Semaphores(int argc, const char *argv[])
void Semaphore_Destroy(Semaphore *sema)
bool Semaphore_TryAcquire(Semaphore *sema)
void Semaphore_Acquire(Semaphore *sema)
void Semaphore_Init(Semaphore *sema, int count, const char *name)
#define SEMAPHORE_NAMELEN
void Spinlock_Unlock(Spinlock *lock) __UNLOCK_EX(*lock)
#define SPINLOCK_TYPE_NORMAL
void Spinlock_Destroy(Spinlock *lock)
void Spinlock_Lock(Spinlock *lock) __LOCK_EX(*lock)
void Spinlock_Init(Spinlock *lock, const char *name, uint64_t type)
char * strncpy(char *to, const char *from, size_t len)
char name[SEMAPHORE_NAMELEN]