char *mapstat(char s)
{
switch (s) {
- case P_ZOMBIE: return "Defunct";
+ case P_ZOMBIE: return "Defunct";
case P_FORKING: return "Forking";
case P_RUNNING: return "Running";
case P_READY: return "Ready";
case P_SLEEP: return "Asleep";
+ case P_IOWAIT: return "I/O Wait";
case P_STOPPED: return "Stopped";
}
return "?";
#define CFLOCK 0x0F /* flock bits */
#define CFLEX 0x0F /* locked exclusive */
#define CFMAX 0x0E /* highest shared lock count permitted */
+#ifdef CONFIG_BLOCK_SLEEP
+ uint16_t c_lock; /* inode lock state */
+#endif
} cinode, *inoptr;
#define NULLINODE ((inoptr)NULL)
/* The sleeping range must be together see swap.c */
#define P_READY 2 /* Runnable */
#define P_SLEEP 3 /* Sleeping; can be awakened by signal */
-#define P_STOPPED 4 /* Sleeping, don't wake up for signal */
-#define P_FORKING 5 /* In process of forking; do not mess with */
-#define P_ZOMBIE 6 /* Exited. */
-#define P_NOSLEEP 7 /* In an internal state where sleep is forbidden */
+#define P_IOWAIT 4 /* Sleeping: don't wake for a signal */
+#define P_STOPPED 5 /* Sleeping, signal driven halt */
+#define P_FORKING 6 /* In process of forking; do not mess with */
+#define P_ZOMBIE 7 /* Exited. */
+#define P_NOSLEEP 8 /* In an internal state where sleep is forbidden */
/* 0 is used to mean 'check we could signal this process' */
/* process.c */
extern void psleep(void *event);
+extern void psleep_nosig(void *event);
extern void wakeup(void *event);
extern void pwake(ptptr p);
extern ptptr getproc(void);