Skip to content

Multi thread, where to start? #71

Answered by IanSeyler
WEREMSOFT asked this question in Q&A
Discussion options

You must be logged in to vote

Just a quick note first - BareMetal does not support multi-threading in the conventional sense. Multi-core is supported based on the available hardware (as well as "virtually" via Intel HyperThreading). So if your system has 8 CPU Cores you can execute 8 things concurrently.

smptest.asm is a very small example of this.

; b_smp_set -- Set a specific CPU to run code
;  IN:	RAX = Code address
;	RCX = CPU APIC ID
; OUT:	RAX = 0 on error
; Note:	Code address must be 16-byte aligned

b_system is called with smp_set to set a CPU core to run code.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by WEREMSOFT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants