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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/kernel_wrap.h

Issue 23005005: [NaCl SDK] nacl_io: Add initial implementations of kill and signal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LIBRARIES_NACL_IO_KERNEL_WRAP_H_ 5 #ifndef LIBRARIES_NACL_IO_KERNEL_WRAP_H_
6 #define LIBRARIES_NACL_IO_KERNEL_WRAP_H_ 6 #define LIBRARIES_NACL_IO_KERNEL_WRAP_H_
7 7
8 #include <sys/types.h> 8 #include <signal.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
11 #include <sys/ioctl.h>
12 #include <sys/types.h>
11 13
12 #include "nacl_io/ossocket.h" 14 #include "nacl_io/ossocket.h"
13 #include "nacl_io/ostypes.h" 15 #include "nacl_io/ostypes.h"
14 #include "nacl_io/osutime.h" 16 #include "nacl_io/osutime.h"
15 #include "sdk_util/macros.h" 17 #include "sdk_util/macros.h"
16 18
17 #if defined(__GLIBC__) 19 #if defined(__GLIBC__)
18 #include <sys/cdefs.h> 20 #include <sys/cdefs.h>
19 #define NOTHROW __THROW 21 #define NOTHROW __THROW
20 #else 22 #else
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 int _fstat64i32(int fd, struct _stat64i32* buf); 57 int _fstat64i32(int fd, struct _stat64i32* buf);
56 #else 58 #else
57 struct stat; 59 struct stat;
58 int fstat(int fd, struct stat* buf) NOTHROW; 60 int fstat(int fd, struct stat* buf) NOTHROW;
59 #endif 61 #endif
60 int fsync(int fd); 62 int fsync(int fd);
61 int ftruncate(int fd, off_t length) NOTHROW; 63 int ftruncate(int fd, off_t length) NOTHROW;
62 char* NAME(getcwd)(char* buf, getcwd_size_t size) NOTHROW; 64 char* NAME(getcwd)(char* buf, getcwd_size_t size) NOTHROW;
63 char* getwd(char* buf) NOTHROW; 65 char* getwd(char* buf) NOTHROW;
64 int getdents(int fd, void* buf, unsigned int count) NOTHROW; 66 int getdents(int fd, void* buf, unsigned int count) NOTHROW;
65 int ioctl(int d, int request, char* argp) NOTHROW;
66 int NAME(isatty)(int fd) NOTHROW; 67 int NAME(isatty)(int fd) NOTHROW;
67 int lchown(const char* path, uid_t owner, gid_t group) NOTHROW; 68 int lchown(const char* path, uid_t owner, gid_t group) NOTHROW;
68 int link(const char* oldpath, const char* newpath) NOTHROW; 69 int link(const char* oldpath, const char* newpath) NOTHROW;
69 off_t NAME(lseek)(int fd, off_t offset, int whence) NOTHROW; 70 off_t NAME(lseek)(int fd, off_t offset, int whence) NOTHROW;
70 #if defined(WIN32) 71 #if defined(WIN32)
71 int _mkdir(const char* path); 72 int _mkdir(const char* path);
72 #else 73 #else
73 int mkdir(const char* path, mode_t mode) NOTHROW; 74 int mkdir(const char* path, mode_t mode) NOTHROW;
74 #endif 75 #endif
75 void* mmap(void* addr, size_t length, int prot, int flags, int fd, 76 void* mmap(void* addr, size_t length, int prot, int flags, int fd,
76 off_t offset) NOTHROW; 77 off_t offset) NOTHROW;
77 int mount(const char* source, const char* target, const char* filesystemtype, 78 int mount(const char* source, const char* target, const char* filesystemtype,
78 unsigned long mountflags, const void* data) NOTHROW; 79 unsigned long mountflags, const void* data) NOTHROW;
79 int munmap(void* addr, size_t length) NOTHROW; 80 int munmap(void* addr, size_t length) NOTHROW;
80 int NAME(open)(const char* path, int oflag, ...); 81 int NAME(open)(const char* path, int oflag, ...);
81 read_ssize_t NAME(read)(int fd, void* buf, size_t nbyte); 82 read_ssize_t NAME(read)(int fd, void* buf, size_t nbyte);
82 int remove(const char* path) NOTHROW; 83 int remove(const char* path) NOTHROW;
83 int NAME(rmdir)(const char* path) NOTHROW; 84 int NAME(rmdir)(const char* path) NOTHROW;
85 sighandler_t sigset(int sig, sighandler_t disp);
84 #if defined(WIN32) 86 #if defined(WIN32)
85 int setenv(const char* name, const char* value, int overwrite); 87 int setenv(const char* name, const char* value, int overwrite);
86 int _stat32(const char* path, struct _stat32* buf); 88 int _stat32(const char* path, struct _stat32* buf);
87 int _stat64(const char* path, struct _stat64* buf); 89 int _stat64(const char* path, struct _stat64* buf);
88 int _stat32i64(const char* path, struct _stat32i64* buf); 90 int _stat32i64(const char* path, struct _stat32i64* buf);
89 int _stat64i32(const char* path, struct _stat64i32* buf); 91 int _stat64i32(const char* path, struct _stat64i32* buf);
90 #else 92 #else
91 int stat(const char* path, struct stat* buf) NOTHROW; 93 int stat(const char* path, struct stat* buf) NOTHROW;
92 #endif 94 #endif
93 int symlink(const char* oldpath, const char* newpath) NOTHROW; 95 int symlink(const char* oldpath, const char* newpath) NOTHROW;
(...skipping 24 matching lines...) Expand all
118 int setsockopt(int fd, int lvl, int optname, const void* optval, 120 int setsockopt(int fd, int lvl, int optname, const void* optval,
119 socklen_t len); 121 socklen_t len);
120 int shutdown(int fd, int how); 122 int shutdown(int fd, int how);
121 int socket(int domain, int type, int protocol); 123 int socket(int domain, int type, int protocol);
122 int socketpair(int domain, int type, int protocl, int* sv); 124 int socketpair(int domain, int type, int protocl, int* sv);
123 #endif // PROVIDES_SOCKET_API 125 #endif // PROVIDES_SOCKET_API
124 126
125 EXTERN_C_END 127 EXTERN_C_END
126 128
127 #endif // LIBRARIES_NACL_IO_KERNEL_WRAP_H_ 129 #endif // LIBRARIES_NACL_IO_KERNEL_WRAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698