adjust style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
07d9c294a2
commit
f4d2374b45
20
io.c
20
io.c
@ -1351,7 +1351,8 @@ rb_io_addstr(VALUE io, VALUE str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_FSYNC
|
#ifdef HAVE_FSYNC
|
||||||
static VALUE nogvl_fsync(void *ptr)
|
static VALUE
|
||||||
|
nogvl_fsync(void *ptr)
|
||||||
{
|
{
|
||||||
rb_io_t *fptr = ptr;
|
rb_io_t *fptr = ptr;
|
||||||
|
|
||||||
@ -1722,14 +1723,17 @@ rb_io_fsync(VALUE io)
|
|||||||
#else
|
#else
|
||||||
# define rb_io_fsync rb_f_notimplement
|
# define rb_io_fsync rb_f_notimplement
|
||||||
# define rb_io_sync rb_f_notimplement
|
# define rb_io_sync rb_f_notimplement
|
||||||
static VALUE rb_io_set_sync(VALUE io, VALUE sync) {
|
static VALUE
|
||||||
rb_notimplement();
|
rb_io_set_sync(VALUE io, VALUE sync)
|
||||||
/* NEVER REACHED */ return Qundef;
|
{
|
||||||
|
rb_notimplement();
|
||||||
|
UNREACHABLE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FDATASYNC
|
#ifdef HAVE_FDATASYNC
|
||||||
static VALUE nogvl_fdatasync(void *ptr)
|
static VALUE
|
||||||
|
nogvl_fdatasync(void *ptr)
|
||||||
{
|
{
|
||||||
rb_io_t *fptr = ptr;
|
rb_io_t *fptr = ptr;
|
||||||
|
|
||||||
@ -8224,7 +8228,8 @@ struct ioctl_arg {
|
|||||||
long narg;
|
long narg;
|
||||||
};
|
};
|
||||||
|
|
||||||
static VALUE nogvl_ioctl(void *ptr)
|
static VALUE
|
||||||
|
nogvl_ioctl(void *ptr)
|
||||||
{
|
{
|
||||||
struct ioctl_arg *arg = ptr;
|
struct ioctl_arg *arg = ptr;
|
||||||
|
|
||||||
@ -8521,7 +8526,8 @@ struct fcntl_arg {
|
|||||||
long narg;
|
long narg;
|
||||||
};
|
};
|
||||||
|
|
||||||
static VALUE nogvl_fcntl(void *ptr)
|
static VALUE
|
||||||
|
nogvl_fcntl(void *ptr)
|
||||||
{
|
{
|
||||||
struct fcntl_arg *arg = ptr;
|
struct fcntl_arg *arg = ptr;
|
||||||
|
|
||||||
|
30
process.c
30
process.c
@ -991,13 +991,15 @@ static RETSIGTYPE (*saved_sigpipe_handler)(int) = 0;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SIGPIPE
|
#ifdef SIGPIPE
|
||||||
static RETSIGTYPE sig_do_nothing(int sig)
|
static RETSIGTYPE
|
||||||
|
sig_do_nothing(int sig)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This function should be async-signal-safe. Actually it is. */
|
/* This function should be async-signal-safe. Actually it is. */
|
||||||
static void before_exec_async_signal_safe(void)
|
static void
|
||||||
|
before_exec_async_signal_safe(void)
|
||||||
{
|
{
|
||||||
#ifdef SIGPIPE
|
#ifdef SIGPIPE
|
||||||
/*
|
/*
|
||||||
@ -1010,7 +1012,8 @@ static void before_exec_async_signal_safe(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void before_exec_non_async_signal_safe(void)
|
static void
|
||||||
|
before_exec_non_async_signal_safe(void)
|
||||||
{
|
{
|
||||||
if (!forked_child) {
|
if (!forked_child) {
|
||||||
/*
|
/*
|
||||||
@ -1022,21 +1025,24 @@ static void before_exec_non_async_signal_safe(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void before_exec(void)
|
static void
|
||||||
|
before_exec(void)
|
||||||
{
|
{
|
||||||
before_exec_non_async_signal_safe();
|
before_exec_non_async_signal_safe();
|
||||||
before_exec_async_signal_safe();
|
before_exec_async_signal_safe();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function should be async-signal-safe. Actually it is. */
|
/* This function should be async-signal-safe. Actually it is. */
|
||||||
static void after_exec_async_signal_safe(void)
|
static void
|
||||||
|
after_exec_async_signal_safe(void)
|
||||||
{
|
{
|
||||||
#ifdef SIGPIPE
|
#ifdef SIGPIPE
|
||||||
signal(SIGPIPE, saved_sigpipe_handler); /* async-signal-safe */
|
signal(SIGPIPE, saved_sigpipe_handler); /* async-signal-safe */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void after_exec_non_async_signal_safe(void)
|
static void
|
||||||
|
after_exec_non_async_signal_safe(void)
|
||||||
{
|
{
|
||||||
rb_thread_reset_timer_thread();
|
rb_thread_reset_timer_thread();
|
||||||
rb_thread_start_timer_thread();
|
rb_thread_start_timer_thread();
|
||||||
@ -1044,7 +1050,8 @@ static void after_exec_non_async_signal_safe(void)
|
|||||||
forked_child = 0;
|
forked_child = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void after_exec(void)
|
static void
|
||||||
|
after_exec(void)
|
||||||
{
|
{
|
||||||
after_exec_async_signal_safe();
|
after_exec_async_signal_safe();
|
||||||
after_exec_non_async_signal_safe();
|
after_exec_non_async_signal_safe();
|
||||||
@ -2099,7 +2106,8 @@ rb_execarg_new(int argc, VALUE *argv, int accept_shell)
|
|||||||
return execarg_obj;
|
return execarg_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct rb_execarg *rb_execarg_get(VALUE execarg_obj)
|
struct rb_execarg
|
||||||
|
*rb_execarg_get(VALUE execarg_obj)
|
||||||
{
|
{
|
||||||
struct rb_execarg *eargp;
|
struct rb_execarg *eargp;
|
||||||
TypedData_Get_Struct(execarg_obj, struct rb_execarg, &exec_arg_data_type, eargp);
|
TypedData_Get_Struct(execarg_obj, struct rb_execarg, &exec_arg_data_type, eargp);
|
||||||
@ -5305,7 +5313,8 @@ proc_setgid(VALUE obj, VALUE id)
|
|||||||
*/
|
*/
|
||||||
#define RB_MAX_GROUPS (65536)
|
#define RB_MAX_GROUPS (65536)
|
||||||
static int _maxgroups = -1;
|
static int _maxgroups = -1;
|
||||||
static int get_sc_ngroups_max(void)
|
static int
|
||||||
|
get_sc_ngroups_max(void)
|
||||||
{
|
{
|
||||||
#ifdef _SC_NGROUPS_MAX
|
#ifdef _SC_NGROUPS_MAX
|
||||||
return (int)sysconf(_SC_NGROUPS_MAX);
|
return (int)sysconf(_SC_NGROUPS_MAX);
|
||||||
@ -5315,7 +5324,8 @@ static int get_sc_ngroups_max(void)
|
|||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
static int maxgroups(void)
|
static int
|
||||||
|
maxgroups(void)
|
||||||
{
|
{
|
||||||
if (_maxgroups < 0) {
|
if (_maxgroups < 0) {
|
||||||
_maxgroups = get_sc_ngroups_max();
|
_maxgroups = get_sc_ngroups_max();
|
||||||
|
3
sparc.c
3
sparc.c
@ -9,7 +9,8 @@
|
|||||||
|
|
||||||
See http://bugs.ruby-lang.org/issues/5244 for discussion.
|
See http://bugs.ruby-lang.org/issues/5244 for discussion.
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
void rb_sparc_flush_register_windows(void)
|
void
|
||||||
|
rb_sparc_flush_register_windows(void)
|
||||||
{
|
{
|
||||||
asm
|
asm
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
11
thread.c
11
thread.c
@ -2725,8 +2725,9 @@ rb_thread_fd_select(int max, rb_fdset_t * read, rb_fdset_t * write, rb_fdset_t *
|
|||||||
|
|
||||||
#ifndef HAVE_PPOLL
|
#ifndef HAVE_PPOLL
|
||||||
/* TODO: don't ignore sigmask */
|
/* TODO: don't ignore sigmask */
|
||||||
int ppoll(struct pollfd *fds, nfds_t nfds,
|
int
|
||||||
const struct timespec *ts, const sigset_t *sigmask)
|
ppoll(struct pollfd *fds, nfds_t nfds,
|
||||||
|
const struct timespec *ts, const sigset_t *sigmask)
|
||||||
{
|
{
|
||||||
int timeout_ms;
|
int timeout_ms;
|
||||||
|
|
||||||
@ -2743,7 +2744,8 @@ int ppoll(struct pollfd *fds, nfds_t nfds,
|
|||||||
else
|
else
|
||||||
timeout_ms = tmp + tmp2;
|
timeout_ms = tmp + tmp2;
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
timeout_ms = -1;
|
timeout_ms = -1;
|
||||||
|
|
||||||
return poll(fds, nfds, timeout_ms);
|
return poll(fds, nfds, timeout_ms);
|
||||||
@ -2822,7 +2824,8 @@ retry:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#else /* ! USE_POLL - implement rb_io_poll_fd() using select() */
|
#else /* ! USE_POLL - implement rb_io_poll_fd() using select() */
|
||||||
static rb_fdset_t *init_set_fd(int fd, rb_fdset_t *fds)
|
static rb_fdset_t *
|
||||||
|
init_set_fd(int fd, rb_fdset_t *fds)
|
||||||
{
|
{
|
||||||
rb_fd_init(fds);
|
rb_fd_init(fds);
|
||||||
rb_fd_set(fd, fds);
|
rb_fd_set(fd, fds);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user