Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: src/trusted/service_runtime/include/sys/fcntl.h

Issue 57663004: Add struct flock to newlib fcntl.h. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl Service Runtime API. 8 * NaCl Service Runtime API.
9 */ 9 */
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 /* fcntl(2) flags (l_type field of flock structure) */ 61 /* fcntl(2) flags (l_type field of flock structure) */
62 #define NACL_ABI_F_RDLCK 1 /* read lock */ 62 #define NACL_ABI_F_RDLCK 1 /* read lock */
63 #define NACL_ABI_F_WRLCK 2 /* write lock */ 63 #define NACL_ABI_F_WRLCK 2 /* write lock */
64 #define NACL_ABI_F_UNLCK 3 /* remove lock(s) */ 64 #define NACL_ABI_F_UNLCK 3 /* remove lock(s) */
65 #ifndef _POSIX_SOURCE 65 #ifndef _POSIX_SOURCE
66 #define NACL_ABI_F_UNLKSYS 4 /* remove remote locks for a given system */ 66 #define NACL_ABI_F_UNLKSYS 4 /* remove remote locks for a given system */
67 #endif /* !_POSIX_SOURCE */ 67 #endif /* !_POSIX_SOURCE */
68 68
69 #ifdef __native_client__ 69 #ifdef __native_client__
70 /* file segment locking set data type - information passed to system by user */
71 struct flock {
72 short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
73 short l_whence; /* flag to choose starting offset */
74 long l_start; /* relative offset, in bytes */
Mark Seaborn 2013/11/08 22:32:35 The Linux fcntl(2) man page says that l_start and
Sam Clegg 2013/11/25 19:50:25 Done.
75 long l_len; /* length, in bytes; 0 means lock to EOF */
76 short l_pid; /* returned with F_GETLK */
Mark Seaborn 2013/11/08 22:32:35 The Linux fcntl(2) man page says that l_pid is of
Sam Clegg 2013/11/25 19:50:25 Done.
77 short l_xxx; /* reserved for future use */
78 };
79
70 #ifdef __cplusplus 80 #ifdef __cplusplus
71 extern "C" { 81 extern "C" {
72 #endif /* __cplusplus */ 82 #endif /* __cplusplus */
73 83
74 extern int open(const char *file, int oflag, ...); 84 extern int open(const char *file, int oflag, ...);
75 extern int fcntl(int, int, ...); 85 extern int fcntl(int, int, ...);
76 86
77 #ifdef __cplusplus 87 #ifdef __cplusplus
78 } /* extern "C" */ 88 } /* extern "C" */
79 #endif /* __cplusplus */ 89 #endif /* __cplusplus */
80 #endif /* __native_client__ */ 90 #endif /* __native_client__ */
81 91
82 #endif 92 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698