summaryrefslogtreecommitdiff
path: root/libtrivfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-02-18 19:47:39 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-02-18 19:47:39 +0000
commitb7a1db07fdc904720b9c8f6a88734d55403d7454 (patch)
tree5721fb831f2b09174c47060151634ea453e45028 /libtrivfs
parentd0115ef6335480777c54c34b9070306ee9d4e8e2 (diff)
Formerly file-lock.c.~3~
Diffstat (limited to 'libtrivfs')
-rw-r--r--libtrivfs/file-lock.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/libtrivfs/file-lock.c b/libtrivfs/file-lock.c
index 6829c47c..9045aa1d 100644
--- a/libtrivfs/file-lock.c
+++ b/libtrivfs/file-lock.c
@@ -17,39 +17,15 @@
#include "priv.h"
-static struct mutex lock = MUTEX_INITIALIZER;
-static struct lock_box lockbox;
-static int inited = 0;
-
error_t
trivfs_S_file_lock (struct protid *cred, int flags)
{
- error_t err;
-
- if (!cred)
- return EOPNOTSUPP;
-
- mutex_lock (&lock);
- if (!inited)
- {
- fshelp_lock_init (&lockbox);
- inited = 1;
- }
- err = fshelp_acquire_lock (&lockbox, &cred->po->lock_status, &lock, flags);
- mutex_unlock (&lock);
- return err;
+ return EOPNOTSUPP;
}
error_t
trivfs_S_file_lock_stat (struct protid *cred, int *mystatus, int *otherstat)
{
- if (!cred)
- return EOPNOTSUPP;
-
- mutex_lock (&lock);
- *mystatus = cred->po->lock_status;
- *otherstat = lockbox.type;
- mutex_unlock (&lock);
- return 0;
+ return EOPNOTSUPP;
}