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

Issue 7785030: Replace #define syscalls cancel machinery. (Closed)

Created:
9 years, 3 months ago by khim
Modified:
9 years, 3 months ago
CC:
native-client-reviews_googlegroups.com, Mark Seaborn
Base URL:
http://git.chromium.org/native_client/nacl-glibc.git@master
Visibility:
Public.

Description

Replace #define syscalls cancel machinery. Use inline functions for type-checking. Separate CL will allow user to redefine/catch these functions. R=pasko@google.com Committed: http://git.chromium.org/gitweb?p=native_client/nacl-glibc.git;a=commit;h=ca3390c

Patch Set 1 #

Patch Set 2 : Remove few more warnings... #

Patch Set 3 : -38 => 38 (like in IRT) #

Patch Set 4 : Fix flakiness in pthread_getcpuclockid #

Patch Set 5 : Fix typo #

Patch Set 6 : Fix glibc-tests compilation #

Patch Set 7 : Another (hopefully working) fix for glibc-tests #

Total comments: 14

Patch Set 8 : Fix small typos #

Patch Set 9 : Cosmetic change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1298 lines, -252 lines) Patch
M nptl/forward.c View 1 chunk +2 lines, -1 line 0 comments Download
M nptl/pthread_create.c View 1 chunk +2 lines, -1 line 0 comments Download
M nptl/sysdeps/i386/tls.h View 6 2 chunks +15 lines, -6 lines 0 comments Download
M nptl/sysdeps/pthread/createthread.c View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M nptl/sysdeps/x86_64/tls.h View 6 2 chunks +13 lines, -4 lines 0 comments Download
M sysdeps/nacl/exit-thread.c View 1 chunk +2 lines, -1 line 0 comments Download
M sysdeps/nacl/futex_emulation.h View 2 chunks +6 lines, -3 lines 0 comments Download
M sysdeps/nacl/futex_emulation.c View 1 2 3 4 5 6 7 7 chunks +24 lines, -13 lines 0 comments Download
M sysdeps/nacl/irt_syscalls.h View 1 2 3 4 5 6 7 1 chunk +46 lines, -0 lines 0 comments Download
M sysdeps/nacl/read.c View 1 chunk +1 line, -1 line 0 comments Download
M sysdeps/nacl/sysdep.h View 1 2 3 4 5 6 7 8 3 chunks +1174 lines, -209 lines 0 comments Download
M sysdeps/posix/libc_fatal.c View 3 chunks +4 lines, -4 lines 0 comments Download
M sysdeps/unix/sysv/linux/futimes.c View 1 chunk +2 lines, -2 lines 0 comments Download
M sysdeps/unix/sysv/linux/libc_fatal.c View 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
khim
9 years, 3 months ago (2011-08-31 16:31:53 UTC) #1
pasko-google - do not use
LGT mostly agreed, though the amounts of adapter functions scare me, I could not verify ...
9 years, 3 months ago (2011-09-02 16:25:24 UTC) #2
pasko-google - do not use
I mean, LGTM
9 years, 3 months ago (2011-09-02 16:25:41 UTC) #3
khim
9 years, 3 months ago (2011-09-02 16:36:09 UTC) #4
http://codereview.chromium.org/7785030/diff/9002/sysdeps/nacl/futex_emulation.c
File sysdeps/nacl/futex_emulation.c (right):

http://codereview.chromium.org/7785030/diff/9002/sysdeps/nacl/futex_emulation...
sysdeps/nacl/futex_emulation.c:261: retcode = nacl_futex_wake_nolock (addr1,
nwake, __FUTEX_BITSET_MATCH_ANY, count);
On 2011/09/02 16:25:24, pasko wrote:
> line too long

Done.

http://codereview.chromium.org/7785030/diff/9002/sysdeps/nacl/irt_syscalls.h
File sysdeps/nacl/irt_syscalls.h (right):

http://codereview.chromium.org/7785030/diff/9002/sysdeps/nacl/irt_syscalls.h#...
sysdeps/nacl/irt_syscalls.h:84: #include <linux/posix_types.h>
On 2011/09/02 16:25:24, pasko wrote:
> minor: plz, group linear part of includes together, and visibly separate

Done.

http://codereview.chromium.org/7785030/diff/9002/sysdeps/nacl/sysdep.h
File sysdeps/nacl/sysdep.h (right):

http://codereview.chromium.org/7785030/diff/9002/sysdeps/nacl/sysdep.h#newcode10
sysdeps/nacl/sysdep.h:10: don't hard code the value of ENOSYS. */
On 2011/09/02 16:25:24, pasko wrote:
> this TODO is obsolete, please, remove
> 
> we should clarify somehow what we are doing:
> 
> /* Implementation of all syscalls for use in platform- and OS- independent
code
>    as inline functions.  Each function translates the syscall arguments into
IRT
>    arguments and allows to intercept each call in user code.
>    TODO(khim): implement the interception logic.  */

Done.

http://codereview.chromium.org/7785030/diff/9002/sysdeps/nacl/sysdep.h#newcode21
sysdeps/nacl/sysdep.h:21: (*err) = (38 /* ENOSYS */);
Because it's sometimes defined as "12" (from NaCl headers) and sometimes as "38"
(Linux).

This is a mess, but this CL is already too big to try to fit cleanup logic here.

Round brackets will make search/and/replace work easier.

http://codereview.chromium.org/7785030/diff/9002/sysdeps/nacl/sysdep.h#newcod...
sysdeps/nacl/sysdep.h:223: switch
(futex_operation.decoded_futex_operation.operation)
All other functions use switch.

http://codereview.chromium.org/7785030/diff/9002/sysdeps/nacl/sysdep.h#newcod...
sysdeps/nacl/sysdep.h:1234: #define INTERNAL_SYSCALL_ERRNO(val, err) err
On 2011/09/02 16:25:24, pasko wrote:
> (err)

Done.

http://codereview.chromium.org/7785030/diff/9002/sysdeps/nacl/sysdep.h#newcod...
sysdeps/nacl/sysdep.h:1237: #define INTERNAL_SYSCALL_ERROR_P(val, err) err
On 2011/09/02 16:25:24, pasko wrote:
> (err)

Done.

Powered by Google App Engine
This is Rietveld 408576698