lock.h is not really used anymore (now you should be able to check out the

repository under Windows).
Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12802 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-05-24 22:07:29 +00:00
parent 28dd47de9e
commit c477f77c33
5 changed files with 24 additions and 94 deletions

View File

@ -1,24 +1,18 @@
/* Inode - inode access functions
*
* Copyright 2001-2005, Axel Dörfler, axeld@pinc-software.de
* This file may be used under the terms of the MIT License.
*/
#ifndef INODE_H
#define INODE_H
/* Inode - inode access functions
**
** Copyright 2001-2005, Axel Dörfler, axeld@pinc-software.de
** This file may be used under the terms of the MIT License.
*/
#include <KernelExport.h>
#ifdef USER
//# include "myfs.h"
# include <stdio.h>
#endif
#ifndef _IMPEXP_KERNEL
# define _IMPEXP_KERNEL
#endif
#include <lock.h>
#include <cache.h>
#include "cache.h"
#include <string.h>
#include <unistd.h>

View File

@ -1,25 +1,19 @@
/* Journal - transaction and logging
*
* Copyright 2001-2005, Axel Dörfler, axeld@pinc-software.de
* This file may be used under the terms of the MIT License.
*/
#ifndef JOURNAL_H
#define JOURNAL_H
/* Journal - transaction and logging
**
** Copyright 2001-2004, Axel Dörfler, axeld@pinc-software.de
** This file may be used under the terms of the OpenBeOS License.
*/
#include <KernelExport.h>
#ifdef USER
//# include "myfs.h"
# include <stdio.h>
#endif
#ifndef _IMPEXP_KERNEL
# define _IMPEXP_KERNEL
#endif
#include <lock.h>
#include <cache.h>
#include "cache.h"
#include "Volume.h"
#include "Chain.h"

View File

@ -1,22 +1,16 @@
/* Volume - BFS super block, mounting, etc.
*
* Initial version by Axel Dörfler, axeld@pinc-software.de
* This file may be used under the terms of the MIT License.
*/
#ifndef VOLUME_H
#define VOLUME_H
/* Volume - BFS super block, mounting, etc.
**
** Initial version by Axel Dörfler, axeld@pinc-software.de
** This file may be used under the terms of the OpenBeOS License.
*/
#include <KernelExport.h>
#include <fs_interface.h>
extern "C" {
#ifndef _IMPEXP_KERNEL
# define _IMPEXP_KERNEL
#endif
#include "lock.h"
#include "cache.h"
}
#include "cache.h"
#include "bfs.h"
#include "BlockAllocator.h"

View File

@ -1,8 +1,8 @@
/* kernel_interface - file system interface to BeOS' vnode layer
**
** Copyright 2001-2004, Axel Dörfler, axeld@pinc-software.de
** This file may be used under the terms of the Haiku License.
*/
*
* Copyright 2001-2005, Axel Dörfler, axeld@pinc-software.de
* This file may be used under the terms of the MIT License.
*/
#define COMPILE_FOR_R5
@ -26,9 +26,8 @@
# define _IMPEXP_KERNEL
#endif
#include <fsproto.h>
#include <cache.h>
#include <lock.h>
#include "fsproto.h"
#include "cache.h"
#include <fs_index.h>
#include <fs_query.h>

View File

@ -1,51 +0,0 @@
/*
Copyright 1999-2001, Be Incorporated. All Rights Reserved.
This file may be used under the terms of the Be Sample Code License.
*/
#ifndef _LOCK_H
#define _LOCK_H
#include <BeBuild.h>
#include <OS.h>
#ifdef __cplusplus
extern "C" {
#else
typedef struct lock lock;
typedef struct mlock mlock;
#endif
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);
#ifdef LOCK
#undef LOCK
#endif
#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)
#ifdef __cplusplus
} // extern "C"
#endif
#endif