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:
parent
28dd47de9e
commit
c477f77c33
@ -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
|
#ifndef INODE_H
|
||||||
#define 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>
|
#include <KernelExport.h>
|
||||||
#ifdef USER
|
#ifdef USER
|
||||||
//# include "myfs.h"
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _IMPEXP_KERNEL
|
#include "cache.h"
|
||||||
# define _IMPEXP_KERNEL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <lock.h>
|
|
||||||
#include <cache.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -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
|
#ifndef JOURNAL_H
|
||||||
#define 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>
|
#include <KernelExport.h>
|
||||||
|
|
||||||
#ifdef USER
|
#ifdef USER
|
||||||
//# include "myfs.h"
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _IMPEXP_KERNEL
|
#include "cache.h"
|
||||||
# define _IMPEXP_KERNEL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <lock.h>
|
|
||||||
#include <cache.h>
|
|
||||||
|
|
||||||
#include "Volume.h"
|
#include "Volume.h"
|
||||||
#include "Chain.h"
|
#include "Chain.h"
|
||||||
|
@ -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
|
#ifndef VOLUME_H
|
||||||
#define 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 <KernelExport.h>
|
||||||
#include <fs_interface.h>
|
#include <fs_interface.h>
|
||||||
|
|
||||||
extern "C" {
|
#include "cache.h"
|
||||||
#ifndef _IMPEXP_KERNEL
|
|
||||||
# define _IMPEXP_KERNEL
|
|
||||||
#endif
|
|
||||||
#include "lock.h"
|
|
||||||
#include "cache.h"
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "bfs.h"
|
#include "bfs.h"
|
||||||
#include "BlockAllocator.h"
|
#include "BlockAllocator.h"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/* kernel_interface - file system interface to BeOS' vnode layer
|
/* kernel_interface - file system interface to BeOS' vnode layer
|
||||||
**
|
*
|
||||||
** Copyright 2001-2004, Axel Dörfler, axeld@pinc-software.de
|
* Copyright 2001-2005, Axel Dörfler, axeld@pinc-software.de
|
||||||
** This file may be used under the terms of the Haiku License.
|
* This file may be used under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define COMPILE_FOR_R5
|
#define COMPILE_FOR_R5
|
||||||
@ -26,9 +26,8 @@
|
|||||||
# define _IMPEXP_KERNEL
|
# define _IMPEXP_KERNEL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <fsproto.h>
|
#include "fsproto.h"
|
||||||
#include <cache.h>
|
#include "cache.h"
|
||||||
#include <lock.h>
|
|
||||||
|
|
||||||
#include <fs_index.h>
|
#include <fs_index.h>
|
||||||
#include <fs_query.h>
|
#include <fs_query.h>
|
||||||
|
@ -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
|
|
Loading…
x
Reference in New Issue
Block a user