OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-or32/] [semaphore.h] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef _OR32_SEMAPHORE_H
2
#define _OR32_SEMAPHORE_H
3
 
4
/*
5
 * SMP- and interrupt-safe semaphores..
6
 *
7
 * (C) Copyright 1996 Linus Torvalds
8
 *
9
 */
10
 
11
struct semaphore {
12
        int count;
13
        int waking;
14
        int lock;                       /* to make waking testing atomic */
15
        struct wait_queue * wait;
16
};
17
 
18
#define MUTEX ((struct semaphore) { 1, 0, 0, NULL })
19
#define MUTEX_LOCKED ((struct semaphore) { 0, 0, 0, NULL })
20
 
21
extern void down(struct semaphore * sem);
22
extern int down_interruptible(struct semaphore * sem);
23
extern void up(struct semaphore * sem);
24
 
25
extern void get_buzz_lock(int *lock_ptr);
26
extern void give_buzz_lock(int *lock_ptr);
27
 
28
 
29
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.