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

Side by Side Diff: src/shared/platform/linux/nacl_host_dir.c

Issue 10981077: change native_client/.../sys/mman.h to native_client/.../bits/mman.h (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 2 months 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 | « src/shared/imc/win/nacl_shm.cc ('k') | src/shared/platform/osx/nacl_host_dir.c » ('j') | 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. Directory descriptor / Handle abstraction. 8 * NaCl Service Runtime. Directory descriptor / Handle abstraction.
9 * 9 *
10 * Note that we avoid using the thread-specific data / thread local 10 * Note that we avoid using the thread-specific data / thread local
(...skipping 17 matching lines...) Expand all
28 28
29 #include "native_client/src/shared/platform/nacl_check.h" 29 #include "native_client/src/shared/platform/nacl_check.h"
30 #include "native_client/src/shared/platform/nacl_host_desc.h" 30 #include "native_client/src/shared/platform/nacl_host_desc.h"
31 #include "native_client/src/shared/platform/nacl_host_dir.h" 31 #include "native_client/src/shared/platform/nacl_host_dir.h"
32 #include "native_client/src/shared/platform/nacl_log.h" 32 #include "native_client/src/shared/platform/nacl_log.h"
33 #include "native_client/src/shared/platform/nacl_sync.h" 33 #include "native_client/src/shared/platform/nacl_sync.h"
34 #include "native_client/src/shared/platform/nacl_sync_checked.h" 34 #include "native_client/src/shared/platform/nacl_sync_checked.h"
35 35
36 #include "native_client/src/trusted/service_runtime/nacl_config.h" 36 #include "native_client/src/trusted/service_runtime/nacl_config.h"
37 37
38 #include "native_client/src/trusted/service_runtime/include/bits/mman.h"
38 #include "native_client/src/trusted/service_runtime/include/sys/dirent.h" 39 #include "native_client/src/trusted/service_runtime/include/sys/dirent.h"
39 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" 40 #include "native_client/src/trusted/service_runtime/include/sys/errno.h"
40 #include "native_client/src/trusted/service_runtime/include/sys/fcntl.h" 41 #include "native_client/src/trusted/service_runtime/include/sys/fcntl.h"
41 #include "native_client/src/trusted/service_runtime/include/sys/mman.h"
42 #include "native_client/src/trusted/service_runtime/include/sys/stat.h" 42 #include "native_client/src/trusted/service_runtime/include/sys/stat.h"
43 43
44 #ifdef _syscall3 44 #ifdef _syscall3
45 _syscall3(int, getdents, uint, fd, struct dirent *, dirp, uint, count) 45 _syscall3(int, getdents, uint, fd, struct dirent *, dirp, uint, count)
46 46
47 int getdents(unsigned int fd, struct dirent* dirp, unsigned int count); 47 int getdents(unsigned int fd, struct dirent* dirp, unsigned int count);
48 #else 48 #else
49 # include <sys/syscall.h> 49 # include <sys/syscall.h>
50 int getdents(unsigned int fd, struct dirent* dirp, unsigned int count) { 50 int getdents(unsigned int fd, struct dirent* dirp, unsigned int count) {
51 return syscall(__NR_getdents, fd, dirp, count); 51 return syscall(__NR_getdents, fd, dirp, count);
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 if (NULL == d) { 318 if (NULL == d) {
319 NaClLog(LOG_FATAL, "NaClHostDirClose: 'this' is NULL\n"); 319 NaClLog(LOG_FATAL, "NaClHostDirClose: 'this' is NULL\n");
320 } 320 }
321 NaClLog(3, "NaClHostDirClose(%d)\n", d->fd); 321 NaClLog(3, "NaClHostDirClose(%d)\n", d->fd);
322 retval = close(d->fd); 322 retval = close(d->fd);
323 d->fd = -1; 323 d->fd = -1;
324 NaClMutexDtor(&d->mu); 324 NaClMutexDtor(&d->mu);
325 return (-1 == retval) ? -NaClXlateErrno(errno) : retval; 325 return (-1 == retval) ? -NaClXlateErrno(errno) : retval;
326 } 326 }
OLDNEW
« no previous file with comments | « src/shared/imc/win/nacl_shm.cc ('k') | src/shared/platform/osx/nacl_host_dir.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698