cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18746 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0e195cc633
commit
12e4be290d
@ -23,7 +23,6 @@
|
||||
#include <ByteOrder.h>
|
||||
#include <fs_cache.h>
|
||||
|
||||
#include "lock.h"
|
||||
#include "rock.h"
|
||||
#include "iso.h"
|
||||
|
||||
|
@ -33,7 +33,6 @@
|
||||
|
||||
#include <util/kernel_cpp.h>
|
||||
|
||||
#include "lock.h"
|
||||
#include "iso.h"
|
||||
#include "iso9660.h"
|
||||
|
||||
|
@ -1,32 +0,0 @@
|
||||
#ifndef _LOCK_H
|
||||
#define _LOCK_H
|
||||
|
||||
#include <BeBuild.h>
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
typedef struct lock lock;
|
||||
typedef struct mlock mlock;
|
||||
|
||||
struct lock {
|
||||
sem_id s;
|
||||
long c;
|
||||
};
|
||||
|
||||
struct mlock {
|
||||
sem_id s;
|
||||
};
|
||||
|
||||
extern _IMPEXP_KERNEL int new_lock(lock *l, const char *name);
|
||||
extern _IMPEXP_KERNEL int free_lock(lock *l);
|
||||
|
||||
#define LOCK(l) if (atomic_add(&l.c, -1) <= 0) acquire_sem(l.s);
|
||||
#define UNLOCK(l) if (atomic_add(&l.c, 1) < 0) release_sem(l.s);
|
||||
|
||||
extern _IMPEXP_KERNEL int new_mlock(mlock *l, long c, const char *name);
|
||||
extern _IMPEXP_KERNEL int free_mlock(mlock *l);
|
||||
|
||||
#define LOCKM(l,cnt) acquire_sem_etc(l.s, cnt, 0, 0)
|
||||
#define UNLOCKM(l,cnt) release_sem_etc(l.s, cnt, 0)
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user