2 * Copyright 2012 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Paweł Dziepak, pdziepak@quarnos.org
12 #include <SupportDefs.h>
14 #include "DirectoryCache.h"
15 #include "FileSystem.h"
36 LockOwner(uint32 owner
);
48 LockInfo
* fCookieNext
;
50 LockInfo(LockOwner
* owner
);
53 bool operator==(const struct flock
& lock
) const;
54 bool operator==(const LockInfo
& lock
) const;
59 RPC::Request
* fRequest
;
63 FileSystem
* fFileSystem
;
64 RequestEntry
* fRequests
;
69 Cookie(FileSystem
* fileSystem
);
72 status_t
RegisterRequest(RPC::Request
* req
);
73 status_t
UnregisterRequest(RPC::Request
* req
);
77 struct OpenStateCookie
: public Cookie
{
78 OpenState
* fOpenState
;
81 OpenStateCookie(FileSystem
* fileSystem
);
84 struct OpenFileCookie
: public OpenStateCookie
{
87 void AddLock(LockInfo
* lock
);
88 void RemoveLock(LockInfo
* lock
, LockInfo
* prev
);
90 OpenFileCookie(FileSystem
* fileSystem
);
93 struct OpenDirCookie
: public Cookie
{
95 DirectoryCacheSnapshot
* fSnapshot
;
96 NameCacheEntry
* fCurrent
;
101 OpenDirCookie(FileSystem
* fileSystem
);
105 struct OpenAttrCookie
: public OpenStateCookie
{
106 OpenAttrCookie(FileSystem
* fileSystem
);