summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorSvante Signell <svante.signell@gmail.com>2019-10-29 23:52:55 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-10-29 23:54:03 +0100
commit916f1569078e9da233898694c62cd3ad039e803c (patch)
tree6a27a6249f7a49b137119bc420227ebed77400a1 /hurd
parent56079039e9e304a1f2ef4e61949b6ebea230bee1 (diff)
fs: Support for file record locking
2019-02-01 Svante Signell <svante.signell@gmail.com> * Update copyright years. 2018-01-05 Svante Signell <svante.signell@gmail.com> * Update copyright years. * fs.defs: Add new argument rendezvous: mach_port_send_t to RPC file_record_lock. 2017-01-05 Svante Signell <svante.signell@gmail.com> * Update copyright years and headers. 2016-05-23 Svante Signell <svante.signell@gmail.com> * fs.defs: Added description. * hurd_types.defs: Make struct flock_t seven integers long since l_start and l_len are 64bit. * hurd_types.h: typedef flock_t as flock64. 2001-04-10 Neal H Walfield <neal@cs.uml.edu> * fs.defs: New RPC file_record_lock. * hurd_types.defs: Import <fcntl.h>.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/fs.defs39
-rw-r--r--hurd/hurd_types.defs30
-rw-r--r--hurd/hurd_types.h30
3 files changed, 56 insertions, 43 deletions
diff --git a/hurd/fs.defs b/hurd/fs.defs
index 1460131a9..52f9cd37f 100644
--- a/hurd/fs.defs
+++ b/hurd/fs.defs
@@ -1,23 +1,22 @@
/* Definitions for the filesystem interface.
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2010
- Free Software Foundation, Inc.
-This file is part of the GNU Hurd.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2010, 2014-2019
+ Free Software Foundation, Inc.
-The GNU Hurd is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+ This file is part of the GNU Hurd.
-The GNU Hurd is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ The GNU Hurd is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
-You should have received a copy of the GNU General Public License
-along with the GNU Hurd; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ The GNU Hurd is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ You should have received a copy of the GNU General Public License
+ along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>. */
/* All these objects also implement the generic IO facilities. */
@@ -358,6 +357,7 @@ routine file_reparent (
skip; /* Was: file_get_children. */
skip; /* Was: file_get_source. */
+
/* Overlay a task with a file. Necessary initialization, including
authentication changes associated with set[ug]id execution must be
handled by the filesystem. Filesystems normally implement this by
@@ -386,3 +386,14 @@ routine file_utimens (
RPT
new_atime: timespec_t;
new_mtime: timespec_t);
+
+/* Do fcntl type locking on FILE. CMD is from the set F_GETLK64,
+ F_SETLK64, F_SETLKW64. FLOCK64 is passed by the user and is as
+ defined by <fcntl.h>. RENDEZVOUS is MACH_PORT_NULL for per opened
+ file locking and !MACH_PORT_NULL for per process file locking */
+routine file_record_lock (
+ file: file_t;
+ RPT
+ cmd: int;
+ inout flock64: flock_t;
+ rendezvous: mach_port_send_t);
diff --git a/hurd/hurd_types.defs b/hurd/hurd_types.defs
index f0d1a3517..880240450 100644
--- a/hurd/hurd_types.defs
+++ b/hurd/hurd_types.defs
@@ -1,22 +1,22 @@
/* MiG type declarations for Hurd interfaces -*- C -*-
- Copyright (C) 1993,94,95,96,98,2001,02,17 Free Software Foundation, Inc.
-This file is part of the GNU Hurd.
+ Copyright (C) 1993-1996, 1998, 2001, 2002, 2014-2019
+ Free Software Foundation, Inc.
-The GNU Hurd is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+ This file is part of the GNU Hurd.
-The GNU Hurd is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ The GNU Hurd is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
-You should have received a copy of the GNU General Public License
-along with the GNU Hurd; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ The GNU Hurd is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ You should have received a copy of the GNU General Public License
+ along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>. */
#ifdef HURD_SERVER
/* The Hurd uses protected payloads to quickly look up the object
@@ -407,7 +407,7 @@ type idarray_t = array[] of uid_t;
type rusage_t = struct[18] of int; /* XXX */
-type flock_t = struct[5] of int;
+type flock_t = struct[7] of int; /* l_start and l_len are 64 bit */
type timespec_t = struct[2] of int;
@@ -421,3 +421,5 @@ import <sys/statfs.h>;
import <sys/resource.h>;
import <sys/utsname.h>;
import <hurd/hurd_types.h>;
+import <fcntl.h>;
+
diff --git a/hurd/hurd_types.h b/hurd/hurd_types.h
index 64b46d155..288dcc2fc 100644
--- a/hurd/hurd_types.h
+++ b/hurd/hurd_types.h
@@ -1,22 +1,22 @@
/* C declarations for Hurd server interfaces
- Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002,
- 2010, 2017 Free Software Foundation, Inc.
-This file is part of the GNU Hurd.
+ Copyright (C) 1993-1996, 1998, 1999, 2001, 2002, 2010, 2014-2019
+ Free Software Foundation, Inc.
-The GNU Hurd is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+ This file is part of the GNU Hurd.
-The GNU Hurd is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ The GNU Hurd is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
-You should have received a copy of the GNU General Public License
-along with the GNU Hurd; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+ The GNU Hurd is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _HURD_TYPES_H
#define _HURD_TYPES_H
@@ -74,7 +74,7 @@ typedef const uid_t *const_idarray_t;
typedef __loff_t *off_array_t;
typedef const __loff_t *const_off_array_t;
typedef struct rusage rusage_t;
-typedef struct flock flock_t;
+typedef struct flock64 flock_t;
typedef struct utsname utsname_t;
#if _FILE_OFFSET_BITS == 64
typedef struct stat io_statbuf_t;