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
Second Extended Filesystem (ext2) and other improvements (#33)
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
sched.h
diff --git
a/lunaix-os/includes/lunaix/sched.h
b/lunaix-os/includes/lunaix/sched.h
index 021b55e9e68a58830d5b08b2dd1b6fa8e4fcdd79..4264307dfa9f20fc8e29e61d047ec4cccbab27c9 100644
(file)
--- a/
lunaix-os/includes/lunaix/sched.h
+++ b/
lunaix-os/includes/lunaix/sched.h
@@
-1,22
+1,37
@@
#ifndef __LUNAIX_SCHEDULER_H
#define __LUNAIX_SCHEDULER_H
#ifndef __LUNAIX_SCHEDULER_H
#define __LUNAIX_SCHEDULER_H
+#include <lunaix/compiler.h>
+#include <lunaix/process.h>
+
#define SCHED_TIME_SLICE 300
#define SCHED_TIME_SLICE 300
+#define MAX_THREAD_PP 1024
+
+#define PROC_TABLE_SIZE 8192
+#define MAX_PROCESS (PROC_TABLE_SIZE / sizeof(ptr_t))
struct scheduler
{
struct scheduler
{
- struct proc_info* _procs;
+ struct proc_info** procs;
+ struct llist_header* threads;
+ struct llist_header* proc_list;
+ struct llist_header sleepers;
+
int procs_index;
int procs_index;
- unsigned int ptable_len;
+ int ptable_len;
+ int ttable_len;
};
void
sched_init();
};
void
sched_init();
-void
+void
noret
schedule();
schedule();
+void noret
+run(struct thread* thread);
+
void
void
-
sched_yieldk
();
+
cleanup_detached_threads
();
#endif /* __LUNAIX_SCHEDULER_H */
#endif /* __LUNAIX_SCHEDULER_H */