* (C) Copyright 1999, 2000 Richard Henderson
*/
+#include <linux/errno.h>
#include <linux/sched.h>
-
/*
* Semaphores are implemented using a two-way counter:
*
#define PROT_READ 0x1 /* page can be read */
#define PROT_WRITE 0x2 /* page can be written */
#define PROT_EXEC 0x4 /* page can be executed */
+#define PROT_SEM 0x8 /* page may be used for atomic ops */
#define PROT_NONE 0x0 /* page can not be accessed */
#define MAP_SHARED 0x01 /* Share changes */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
#define SI_TKILL -6 /* sent by tkill system call */
+#define SI_DETHREAD -7 /* sent by execve() killing subsidiary threads */
#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
struct exec_domain *exec_domain; /* execution domain */
mm_segment_t addr_limit; /* thread address space */
int cpu; /* current CPU */
+ int preempt_count; /* 0 => preemptable, <0 => BUG */
int bpt_nsaved;
unsigned long bpt_addr[2]; /* breakpoint handling */
#endif /* __ASSEMBLY__ */
+#define PREEMPT_ACTIVE 0x4000000
+
/*
* Thread information flags:
* - these are process state flags and used from assembly
static inline long close(int fd)
{
+ extern long sys_close(unsigned int);
return sys_close(fd);
}
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asmlinkage long x(void) __attribute__((weak,alias("sys_ni_syscall")));
#endif /* _ALPHA_UNISTD_H */
#else
#define smp_init() do { } while (0)
#endif
+static inline void setup_per_cpu_areas(void)
+{
+}
static inline void setup_per_cpu_areas(void)
{