projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.25.46: restore errno in signal handlers
[sbcl.git]
/
src
/
runtime
/
linux-os.c
diff --git
a/src/runtime/linux-os.c
b/src/runtime/linux-os.c
index
bcc5e9f
..
d273b13
100644
(file)
--- a/
src/runtime/linux-os.c
+++ b/
src/runtime/linux-os.c
@@
-52,6
+52,8
@@
#include "gc.h"
#if defined LISP_FEATURE_GENCGC
#include "gencgc-internal.h"
#include "gc.h"
#if defined LISP_FEATURE_GENCGC
#include "gencgc-internal.h"
+#else
+#include "cheneygc-internal.h"
#endif
#ifdef LISP_FEATURE_X86
#endif
#ifdef LISP_FEATURE_X86
@@
-87,7
+89,6
@@
futex_wait(int *lock_word, int oldval, long sec, unsigned long usec)
struct timespec timeout;
int t;
struct timespec timeout;
int t;
- again:
if (sec<0) {
t = sys_futex(lock_word,FUTEX_WAIT,oldval, 0);
}
if (sec<0) {
t = sys_futex(lock_word,FUTEX_WAIT,oldval, 0);
}
@@
-101,8
+102,7
@@
futex_wait(int *lock_word, int oldval, long sec, unsigned long usec)
else if (errno==ETIMEDOUT)
return 1;
else if (errno==EINTR)
else if (errno==ETIMEDOUT)
return 1;
else if (errno==EINTR)
- /* spurious wakeup from interrupt */
- goto again;
+ return 2;
else
/* EWOULDBLOCK and others, need to check the lock */
return -1;
else
/* EWOULDBLOCK and others, need to check the lock */
return -1;
@@
-199,7
+199,7
@@
os_init(char *argv[], char *envp[])
* kernel versions on some architectures (for example PPC). FIXME:
* possibly the same should be done on other architectures too.
*/
* kernel versions on some architectures (for example PPC). FIXME:
* possibly the same should be done on other architectures too.
*/
- os_vm_page_size = BACKEND_PAGE_SIZE;
+ os_vm_page_size = BACKEND_PAGE_BYTES;
/* KLUDGE: Disable memory randomization on new Linux kernels
* by setting a personality flag and re-executing. (We need
/* KLUDGE: Disable memory randomization on new Linux kernels
* by setting a personality flag and re-executing. (We need
@@
-214,7
+214,9
@@
os_init(char *argv[], char *envp[])
/* Some old kernels will apparently lose unsupported personality flags
* on exec() */
&& ((minor_version == 6 && patch_version >= 11)
/* Some old kernels will apparently lose unsupported personality flags
* on exec() */
&& ((minor_version == 6 && patch_version >= 11)
- || (minor_version > 6)))
+ || (minor_version > 6)
+ /* This is what RHEL 3 reports */
+ || (minor_version == 4 && patch_version > 20)))
|| major_version >= 3)
{
int pers = personality(0xffffffffUL);
|| major_version >= 3)
{
int pers = personality(0xffffffffUL);
@@
-414,8
+416,6
@@
os_install_interrupt_handlers(void)
undoably_install_low_level_interrupt_handler(SIG_MEMORY_FAULT,
sigsegv_handler);
#ifdef LISP_FEATURE_SB_THREAD
undoably_install_low_level_interrupt_handler(SIG_MEMORY_FAULT,
sigsegv_handler);
#ifdef LISP_FEATURE_SB_THREAD
- undoably_install_low_level_interrupt_handler(SIG_INTERRUPT_THREAD,
- interrupt_thread_handler);
undoably_install_low_level_interrupt_handler(SIG_STOP_FOR_GC,
sig_stop_for_gc_handler);
#endif
undoably_install_low_level_interrupt_handler(SIG_STOP_FOR_GC,
sig_stop_for_gc_handler);
#endif