-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththread.c
More file actions
35 lines (27 loc) · 675 Bytes
/
Copy paththread.c
File metadata and controls
35 lines (27 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* SPDX-License-Identifier: MIT */
#include <thread.h>
#include <spinlock.h>
#include <cpu_data.h>
list_t thread_list;
uint32_t thread_count;
spin_lock_t thread_lock = 0;
static queue_t thread_queue;
static uint32_t thread_queue_bitmap;
void thread_init_early(void)
{
list_init(&thread_list);
boot_cpu_init();
thread_t *t = &get_cpu_data(0)->cpu_processor->idle_thread;
create_bootstrap_thread(t);
}
static void thread_queue_enqueue(thread_t *t)
{
}
void thread_join(thread_t *t, uint64_t timeout)
{
}
void create_bootstrap_thread(thread_t *t)
{
uint32_t cpu_num = get_current_cpu_number();
list_add(&thread_list, &t->thread_list);
}