bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH hurd 1/6] Add file record locking support


From: Samuel Thibault
Subject: Re: [PATCH hurd 1/6] Add file record locking support
Date: Tue, 20 Jan 2015 01:23:30 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Svante Signell, le Thu 08 Jan 2015 12:28:24 +0100, a écrit :
> hurd: add new RPC: file_record_lock

It seems good.

> hurd/ChangeLog
> 2014-08-21  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>.
> 
> Index: hurd-0.5.git20141210/hurd/fs.defs
> ===================================================================
> --- hurd-0.5.git20141210.orig/hurd/fs.defs
> +++ hurd-0.5.git20141210/hurd/fs.defs
> @@ -373,3 +373,12 @@ routine file_get_source (
>       file: file_t;
>       RPT
>       out source: string_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>. */
> +routine file_record_lock (
> +       file: file_t;
> +       RPT
> +       cmd: int;
> +       inout flock64: flock_t);
> Index: hurd-0.5.git20141210/hurd/hurd_types.defs
> ===================================================================
> --- hurd-0.5.git20141210.orig/hurd/hurd_types.defs
> +++ hurd-0.5.git20141210/hurd/hurd_types.defs
> @@ -372,7 +372,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;
>  
> @@ -386,3 +386,5 @@ import <sys/statfs.h>;
>  import <sys/resource.h>;
>  import <sys/utsname.h>;
>  import <hurd/hurd_types.h>;
> +import <fcntl.h>;
> +
> Index: hurd-0.5.git20141210/hurd/hurd_types.h
> ===================================================================
> --- hurd-0.5.git20141210.orig/hurd/hurd_types.h
> +++ hurd-0.5.git20141210/hurd/hurd_types.h
> @@ -65,7 +65,7 @@ typedef pid_t *pidarray_t;
>  typedef uid_t *idarray_t;
>  typedef loff_t *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;


-- 
Samuel
<g> r: et la marmotte, elle écrit un papier IPDPS



reply via email to

[Prev in Thread] Current Thread [Next in Thread]