URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-or32/] [semaphore.h] - Rev 1777
Go to most recent revision | Compare with Previous | Blame | View Log
#ifndef _OR32_SEMAPHORE_H #define _OR32_SEMAPHORE_H /* * SMP- and interrupt-safe semaphores.. * * (C) Copyright 1996 Linus Torvalds * */ struct semaphore { int count; int waking; int lock; /* to make waking testing atomic */ struct wait_queue * wait; }; #define MUTEX ((struct semaphore) { 1, 0, 0, NULL }) #define MUTEX_LOCKED ((struct semaphore) { 0, 0, 0, NULL }) extern void down(struct semaphore * sem); extern int down_interruptible(struct semaphore * sem); extern void up(struct semaphore * sem); extern void get_buzz_lock(int *lock_ptr); extern void give_buzz_lock(int *lock_ptr); #endif
Go to most recent revision | Compare with Previous | Blame | View Log