Enable SELF_PAGING_WORKS
This commit is contained in:
parent
8e56ac9244
commit
51ccc7e3a0
@ -35,8 +35,8 @@
|
||||
# include "arch/ldt.h"
|
||||
#endif
|
||||
|
||||
// TODO (M4): define this once your self-paging implementation works...
|
||||
// #define SELF_PAGING_WORKS
|
||||
// (M4): define this once your self-paging implementation works...
|
||||
#define SELF_PAGING_WORKS
|
||||
|
||||
/// Maximum number of threads in a domain, used to size VM region for thread structures
|
||||
// there is no point having MAX_THREADS > LDT_NENTRIES on x86 (see ldt.c)
|
||||
@ -204,9 +204,9 @@ void thread_remove_from_queue(struct thread **queue, struct thread *thread)
|
||||
#ifdef SELF_PAGING_WORKS
|
||||
static errval_t refill_thread_slabs(struct slab_allocator *slabs)
|
||||
{
|
||||
// TODO(M4):
|
||||
// (M4):
|
||||
// - implement me!
|
||||
return LIB_ERR_NOT_IMPLEMENTED;
|
||||
return slab_default_refill(slabs);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1110,10 +1110,6 @@ static int bootstrap_thread(struct spawn_domain_params *params)
|
||||
// Until we have self-paging, we cannot use the paging-region based thread
|
||||
// control block slab allocator, so just run main thread directly
|
||||
#ifndef SELF_PAGING_WORKS
|
||||
// TODO rueegges: remove this when SELF_PAGING_WORKS.
|
||||
// this is required to create threads for testing before we have self paging
|
||||
size_t blocksize = sizeof(struct thread) + tls_block_total_len + THREAD_ALIGNMENT;
|
||||
slab_init(&thread_slabs, blocksize, slab_default_refill);
|
||||
// we aren't prepared to run real threads yet
|
||||
main_thread(params);
|
||||
#else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user