git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: input device subsystem to resolve race condition on polling input
[lunaix-os.git]
/
lunaix-os
/
kernel
/
proc0.c
diff --git
a/lunaix-os/kernel/proc0.c
b/lunaix-os/kernel/proc0.c
index e137b8e28009dd89d477242a3fd99871c7fa5492..c02cbe1f3087f35ad9f2e4a6587c57a15f2c4411 100644
(file)
--- a/
lunaix-os/kernel/proc0.c
+++ b/
lunaix-os/kernel/proc0.c
@@
-46,8
+46,9
@@
__do_reserved_memory(int unlock);
#define USE_DEMO
// #define DEMO_SIGNAL
#define USE_DEMO
// #define DEMO_SIGNAL
-#define DEMO_READDIR
-//#define DEMO_IOTEST
+// #define DEMO_READDIR
+// #define DEMO_IOTEST
+#define DEMO_INPUT_TEST
extern void
_pconsole_main();
extern void
_pconsole_main();
@@
-64,6
+65,9
@@
_readdir_main();
extern void
_iotest_main();
extern void
_iotest_main();
+extern void
+input_test();
+
void __USER__
__proc0_usr()
{
void __USER__
__proc0_usr()
{
@@
-74,9
+78,9
@@
__proc0_usr()
int stdin = dup2(stdout, 1);
pid_t p;
int stdin = dup2(stdout, 1);
pid_t p;
- if (!fork()) {
- _pconsole_main();
- }
+
//
if (!fork()) {
+
//
_pconsole_main();
+
//
}
if (!(p = fork())) {
#ifndef USE_DEMO
if (!(p = fork())) {
#ifndef USE_DEMO
@@
-87,9
+91,12
@@
__proc0_usr()
_readdir_main();
#elif defined DEMO_IOTEST
_iotest_main();
_readdir_main();
#elif defined DEMO_IOTEST
_iotest_main();
+#elif defined DEMO_INPUT_TEST
+ input_test();
#else
_lxinit_main();
#endif
#else
_lxinit_main();
#endif
+ _exit(0);
}
waitpid(p, 0, 0);
}
waitpid(p, 0, 0);