Skip to content

Commit

Permalink
OS-4830 lxbrand convert select/poll to IKE
Browse files Browse the repository at this point in the history
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
pfmooney committed Dec 18, 2015
1 parent e619b08 commit 93ed838
Show file tree
Hide file tree
Showing 14 changed files with 1,019 additions and 744 deletions.
28 changes: 28 additions & 0 deletions usr/src/common/brand/lx/lx_signum.h
Expand Up @@ -79,6 +79,34 @@ extern int lx_ltos_signo(int, int);
extern int lx_stol_status(int, int);
extern int lx_stol_sigcode(int);

/*
* NOTE: Linux uses different definitions for 'sigset_t's and 'sigaction_t's
* depending on whether the definition is for user space or the kernel.
*
* The definitions below MUST correspond to the Linux kernel versions,
* as glibc will do the necessary translation from the Linux user
* versions.
*/
#if defined(_LP64)
#define LX_NSIG_WORDS 1
#define LX_WSHIFT 6
#elif defined(_ILP32)
#define LX_NSIG_WORDS 2
#define LX_WSHIFT 5
#else
#error "LX only supports LP64 and ILP32"
#endif

typedef struct {
ulong_t __bits[LX_NSIG_WORDS];
} lx_sigset_t;

#define LX_NBITS (sizeof (ulong_t) * NBBY)
#define lx_sigmask(n) (1UL << (((n) - 1) % LX_NBITS))
#define lx_sigword(n) (((ulong_t)((n) - 1)) >> LX_WSHIFT)
#define lx_sigismember(s, n) (lx_sigmask(n) & (s)->__bits[lx_sigword(n)])
#define lx_sigaddset(s, n) ((s)->__bits[lx_sigword(n)] |= lx_sigmask(n))

#ifdef __cplusplus
}
#endif
Expand Down
1 change: 0 additions & 1 deletion usr/src/lib/brand/lx/lx_brand/Makefile.com
Expand Up @@ -46,7 +46,6 @@ COBJS = aio.o \
mount.o \
mount_nfs.o \
pgrp.o \
poll_select.o \
priority.o \
ptrace.o \
sched.o \
Expand Down
16 changes: 8 additions & 8 deletions usr/src/lib/brand/lx/lx_brand/common/lx_brand.c
Expand Up @@ -947,7 +947,7 @@ static lx_syscall_handler_t lx_handlers[] = {
lx_stat64, /* 4: stat */
lx_fstat64, /* 5: fstat */
lx_lstat64, /* 6: lstat */
lx_poll, /* 7: poll */
NULL, /* 7: poll */
lx_lseek, /* 8: lseek */
lx_mmap, /* 9: mmap */
lx_mprotect, /* 10: mprotect */
Expand All @@ -963,7 +963,7 @@ static lx_syscall_handler_t lx_handlers[] = {
NULL, /* 20: writev */
lx_access, /* 21: access */
NULL, /* 22: pipe */
lx_select, /* 23: select */
NULL, /* 23: select */
NULL, /* 24: sched_yield */
lx_remap, /* 25: mremap */
lx_msync, /* 26: msync */
Expand Down Expand Up @@ -1210,8 +1210,8 @@ static lx_syscall_handler_t lx_handlers[] = {
lx_readlinkat, /* 267: readlinkat */
NULL, /* 268: fchmodat */
lx_faccessat, /* 269: faccessat */
lx_pselect6, /* 270: pselect6 */
lx_ppoll, /* 271: ppoll */
NULL, /* 270: pselect6 */
NULL, /* 271: ppoll */
NULL, /* 272: unshare */
NULL, /* 273: set_robust_list */
NULL, /* 274: get_robust_list */
Expand Down Expand Up @@ -1413,7 +1413,7 @@ static lx_syscall_handler_t lx_handlers[] = {
lx_setfsgid16, /* 139: setfsgid16 */
lx_llseek, /* 140: llseek */
NULL, /* 141: getdents */
lx_select, /* 142: select */
NULL, /* 142: select */
lx_flock, /* 143: flock */
lx_msync, /* 144: msync */
NULL, /* 145: readv */
Expand All @@ -1439,7 +1439,7 @@ static lx_syscall_handler_t lx_handlers[] = {
lx_getresuid16, /* 165: getresuid16 */
NULL, /* 166: vm86 */
lx_query_module, /* 167: query_module */
lx_poll, /* 168: poll */
NULL, /* 168: poll */
NULL, /* 169: nfsservctl */
NULL, /* 170: setresgid16 */
lx_getresgid16, /* 171: getresgid16 */
Expand Down Expand Up @@ -1579,8 +1579,8 @@ static lx_syscall_handler_t lx_handlers[] = {
lx_readlinkat, /* 305: readlinkat */
NULL, /* 306: fchmodat */
lx_faccessat, /* 307: faccessat */
lx_pselect6, /* 308: pselect6 */
lx_ppoll, /* 309: ppoll */
NULL, /* 308: pselect6 */
NULL, /* 309: ppoll */
NULL, /* 310: unshare */
NULL, /* 311: set_robust_list */
NULL, /* 312: get_robust_list */
Expand Down
289 changes: 0 additions & 289 deletions usr/src/lib/brand/lx/lx_brand/common/poll_select.c

This file was deleted.

0 comments on commit 93ed838

Please sign in to comment.