* offset are used for the per-process notification bit maps.
*/
#define NOTIFY_FROM(p_nr) (0x1000 | ((p_nr) + NR_TASKS))
-# define SYN_ALARM NOTIFY_FROM(CLOCK) /* synchronous alarm */
-# define KSIG_PENDING NOTIFY_FROM(SYSTEM) /* pending signal(s) */
-# define HARD_INT NOTIFY_FROM(HARDWARE) /* hardware interrupt */
-# define NEW_KMESS NOTIFY_FROM(SYSTEM) /* new kernel message */
-# define NEW_KSIG NOTIFY_FROM(HARDWARE) /* new kernel signal */
-# define FKEY_PRESSED NOTIFY_FROM(TTY) /* function key press */
+# define SYN_ALARM NOTIFY_FROM(CLOCK) /* synchronous alarm */
+# define SYS_EVENT NOTIFY_FROM(SYSTEM) /* signal system event */
+# define HARD_INT NOTIFY_FROM(HARDWARE) /* hardware interrupt */
+# define NEW_KSIG NOTIFY_FROM(HARDWARE) /* new kernel signal */
+# define FKEY_PRESSED NOTIFY_FROM(TTY) /* function key press */
#define NOTIFICATION 0x800 /* flag for notifications */
# define HARD_STOP (NOTIFICATION | 4) /* system shutdown */
# define SYS_PHYSCOPY 31 /* sys_physcopy(src_addr,dst_addr,count) */
# define SYS_VIRVCOPY 32 /* sys_virvcopy(vec_ptr, vec_size) */
# define SYS_MEMSET 33 /* sys_memset(char, addr, count) */
-# define SYS_SETPRIORITY 34 /* sys_setpriority(who,prio) */
+# define SYS_NICE 34 /* sys_nice(who,prio) */
#define NR_SYS_CALLS 35 /* number of system calls */
/* Field names for SYS_MEMSET, SYS_SEGCTL. */
#define I_PROC_NR m7_i4 /* calling process */
#define I_VAL_PTR m7_p1 /* virtual address at caller */
#define I_VAL_LEN m7_i1 /* max length of value */
-#define I_KEY_PTR m7_p2 /* virtual address of key to lookup */
-#define I_KEY_LEN m7_i2 /* length of key to lookup */
+#define I_VAL_PTR2 m7_p2 /* second virtual address */
+#define I_VAL_LEN2 m7_i2 /* second length, or proc nr */
/* Field names for SYS_TIMES. */
#define T_PROC_NR m4_l1 /* process to request time info for */
/* Defines for driver and kernel configuration. */
#define AUTO_BIOS 0 /* xt_wini.c - use Western's autoconfig BIOS */
#define LINEWRAP 1 /* console.c - wrap lines at column 80 */
-#define ALLOW_GAP_MESSAGES 1 /* proc.c - allow messages in the gap between
- * the end of bss and lowest stack address */
/* Number of controller tasks (/dev/cN device classes). */
#define NR_CTRLRS 2
_PROTOTYPE( int sys_trace, (int req, int proc, long addr, long *data_p) );
_PROTOTYPE( int sys_svrctl, (int proc, int req, int priv,vir_bytes argp));
-_PROTOTYPE( int sys_setpriority, (int proc, int prio) );
+_PROTOTYPE( int sys_nice, (int proc, int prio) );
/* Shorthands for sys_sdevio() system call. */
#define sys_getschedinfo(v1,v2) sys_getinfo(GET_SCHEDINFO, v1,0, v2,0)
#define sys_getlocktimings(dst) sys_getinfo(GET_LOCKTIMING, dst, 0,0,0)
_PROTOTYPE(int sys_getinfo, (int request, void *val_ptr, int val_len,
- void *key_ptr, int key_len) );
+ void *val_ptr2, int val_len2) );
/* Signal control. */
_PROTOTYPE(int sys_kill, (int proc, int sig) );
#endif
#endif
-#define _NSIG 17 /* number of signals used */
+#define _NSIG 20 /* number of signals used */
#define SIGHUP 1 /* hangup */
#define SIGINT 2 /* interrupt (DEL) */
#define SIGEMT 7 /* obsolete */
#define SIGBUS 10 /* obsolete */
+/* MINIX specific signals. These signals are not used by user proceses,
+ * but meant to inform system processes, like the PM, about system events.
+ */
+#define SIGKMESS 18 /* new kernel message */
+#define SIGKSIG 19 /* kernel signal pending */
+#define SIGKSTOP 20 /* kernel shutting down */
+
/* POSIX requires the following signals to be defined, even if they are
* not supported. Here are the definitions, but they are not supported.
*/
#define SIGTTIN 21 /* background process wants to read */
#define SIGTTOU 22 /* background process wants to write */
+
/* The sighandler_t type is not allowed unless _POSIX_SOURCE is defined. */
typedef void _PROTOTYPE( (*__sighandler_t), (int) );
#define SIG_IGN ((__sighandler_t) 1) /* ignore signal */
#define SIG_HOLD ((__sighandler_t) 2) /* block signal */
#define SIG_CATCH ((__sighandler_t) 3) /* catch signal */
+#define SIG_MESS ((__sighandler_t) 4) /* pass as message (MINIX) */
#ifdef _POSIX_SOURCE
struct sigaction {
$(LIBSYS)(sys_getinfo.o) \
$(LIBSYS)(sys_irqctl.o) \
$(LIBSYS)(sys_segctl.o) \
- $(LIBSYS)(sys_setpriority.o) \
+ $(LIBSYS)(sys_nice.o) \
$(LIBSYS)(sys_umap.o) \
$(LIBSYS)(sys_physcopy.o) \
$(LIBSYS)(sys_vircopy.o) \
$(LIBSYS)(sys_eniop.o): sys_eniop.c
$(CC1) sys_eniop.c
-$(LIBSYS)(sys_setpriority.o): sys_setpriority.c
- $(CC1) sys_setpriority.c
+$(LIBSYS)(sys_nice.o): sys_nice.c
+ $(CC1) sys_nice.c
$(LIBSYS)(sys_segctl.o): sys_segctl.c
$(CC1) sys_segctl.c
/*===========================================================================*
* sys_getinfo *
*===========================================================================*/
-PUBLIC int sys_getinfo(request, val_ptr, val_len, key_ptr, key_len)
+PUBLIC int sys_getinfo(request, ptr, len, ptr2, len2)
int request; /* system info requested */
-void *val_ptr; /* pointer where to store it */
-int val_len; /* max length of value to get */
-void *key_ptr; /* pointer to key requested */
-int key_len; /* length of key */
+void *ptr; /* pointer where to store it */
+int len; /* max length of value to get */
+void *ptr2; /* second pointer */
+int len2; /* length or process nr */
{
message m;
m.I_REQUEST = request;
m.I_PROC_NR = SELF; /* always store values at caller */
- m.I_VAL_PTR = val_ptr;
- m.I_VAL_LEN = val_len;
- m.I_KEY_PTR = key_ptr;
- m.I_KEY_LEN = key_len;
+ m.I_VAL_PTR = ptr;
+ m.I_VAL_LEN = len;
+ m.I_VAL_PTR2 = ptr2;
+ m.I_VAL_LEN2 = len2;
return(_taskcall(SYSTASK, SYS_GETINFO, &m));
}
#include "syslib.h"
/*===========================================================================*
- * sys_xit *
+ * sys_nice *
*===========================================================================*/
-PUBLIC int sys_setpriority(int proc, int prio)
+PUBLIC int sys_nice(int proc, int prio)
{
message m;
m.m1_i1 = proc;
m.m1_i2 = prio;
- return(_taskcall(SYSTASK, SYS_SETPRIORITY, &m));
+ return(_taskcall(SYSTASK, SYS_NICE, &m));
}