| OLD | NEW |
| 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 Loading... |
| 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; |
| 73 short l_whence; |
| 74 off_t l_start; |
| 75 off_t l_len; |
| 76 pid_t l_pid; |
| 77 }; |
| 78 |
| 70 #ifdef __cplusplus | 79 #ifdef __cplusplus |
| 71 extern "C" { | 80 extern "C" { |
| 72 #endif /* __cplusplus */ | 81 #endif /* __cplusplus */ |
| 73 | 82 |
| 74 extern int open(const char *file, int oflag, ...); | 83 extern int open(const char *file, int oflag, ...); |
| 75 extern int fcntl(int, int, ...); | 84 extern int fcntl(int, int, ...); |
| 76 | 85 |
| 77 #ifdef __cplusplus | 86 #ifdef __cplusplus |
| 78 } /* extern "C" */ | 87 } /* extern "C" */ |
| 79 #endif /* __cplusplus */ | 88 #endif /* __cplusplus */ |
| 80 #endif /* __native_client__ */ | 89 #endif /* __native_client__ */ |
| 81 | 90 |
| 82 #endif | 91 #endif |
| OLD | NEW |