mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-22 19:44:10 +02:00
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts: configure.ac libguile/deprecated.c libguile/deprecated.h libguile/filesys.h libguile/fluids.c libguile/fports.c libguile/gc.c libguile/guile.c libguile/numbers.c libguile/objcodes.c libguile/r6rs-ports.c libguile/smob.c libguile/socket.c libguile/threads.h module/language/scheme/decompile-tree-il.scm module/language/tree-il/peval.scm test-suite/tests/syncase.test
This commit is contained in:
commit
26d148066f
523 changed files with 10485 additions and 3954 deletions
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
|
||||
* 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
* 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
|
||||
* Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@ -45,6 +45,8 @@
|
|||
# include <pthread_np.h>
|
||||
#endif
|
||||
|
||||
#include <sys/select.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <nproc.h>
|
||||
|
@ -1057,7 +1059,10 @@ SCM_DEFINE (scm_call_with_new_thread, "call-with-new-thread", 1, 1, 0,
|
|||
errno = err;
|
||||
scm_syserror (NULL);
|
||||
}
|
||||
scm_i_scm_pthread_cond_wait (&data.cond, &data.mutex);
|
||||
|
||||
while (scm_is_false (data.thread))
|
||||
scm_i_scm_pthread_cond_wait (&data.cond, &data.mutex);
|
||||
|
||||
scm_i_pthread_mutex_unlock (&data.mutex);
|
||||
|
||||
return data.thread;
|
||||
|
@ -1134,7 +1139,10 @@ scm_spawn_thread (scm_t_catch_body body, void *body_data,
|
|||
errno = err;
|
||||
scm_syserror (NULL);
|
||||
}
|
||||
scm_i_scm_pthread_cond_wait (&data.cond, &data.mutex);
|
||||
|
||||
while (scm_is_false (data.thread))
|
||||
scm_i_scm_pthread_cond_wait (&data.cond, &data.mutex);
|
||||
|
||||
scm_i_pthread_mutex_unlock (&data.mutex);
|
||||
|
||||
assert (SCM_I_IS_THREAD (data.thread));
|
||||
|
@ -1867,9 +1875,9 @@ SCM_DEFINE (scm_condition_variable_p, "condition-variable?", 1, 0, 0,
|
|||
struct select_args
|
||||
{
|
||||
int nfds;
|
||||
SELECT_TYPE *read_fds;
|
||||
SELECT_TYPE *write_fds;
|
||||
SELECT_TYPE *except_fds;
|
||||
fd_set *read_fds;
|
||||
fd_set *write_fds;
|
||||
fd_set *except_fds;
|
||||
struct timeval *timeout;
|
||||
|
||||
int result;
|
||||
|
@ -1892,11 +1900,19 @@ do_std_select (void *args)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if !SCM_HAVE_SYS_SELECT_H
|
||||
static int scm_std_select (int nfds,
|
||||
fd_set *readfds,
|
||||
fd_set *writefds,
|
||||
fd_set *exceptfds,
|
||||
struct timeval *timeout);
|
||||
#endif
|
||||
|
||||
int
|
||||
scm_std_select (int nfds,
|
||||
SELECT_TYPE *readfds,
|
||||
SELECT_TYPE *writefds,
|
||||
SELECT_TYPE *exceptfds,
|
||||
fd_set *readfds,
|
||||
fd_set *writefds,
|
||||
fd_set *exceptfds,
|
||||
struct timeval *timeout)
|
||||
{
|
||||
fd_set my_readfds;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue