From 421d342d4db902e888af9ac7a81368af47bc308c Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Mon, 7 Feb 1994 20:59:28 +0000 Subject: Formerly fshelp.h.~6~ --- libfshelp/fshelp.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'libfshelp') diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h index 6837e708..5b39877c 100644 --- a/libfshelp/fshelp.h +++ b/libfshelp/fshelp.h @@ -118,5 +118,27 @@ void fshelp_translator_iterate (void (*func)(struct trans_link *, void *), we need to. */ void fshelp_kill_translator (struct trans_link *link); + + +/* Flock handling. */ +struct lock_box +{ + int type; + struct condition wait; + int waiting; + int shcount; +}; + +/* Call when a user makes a request to acquire an lock via file_lock. + There should be one lock box per object and one int per open; these + are passed as arguments BOX and USER respectively. FLAGS are as + per file_lock. MUT is a mutex which will be held whenever this + routine is called, to lock BOX->wait. */ +error_t fshelp_acquire_lock (struct lock_box *box, int *user, + struct mutex *mut, int flags); + + + + #endif -- cgit v1.2.3