Answer the question
In order to leave comments, you need to log in
Multithreading in C in assembly language - is it possible?
Good evening!
In C, multithreading is usually implemented in the pthreads.h library, and C can be debugged as assembler code. I read on the Internet that an assembler program can only run on one core. How then is multithreading implemented in C, since there is an equivalent code in assembler, for example, in gnu debugger?
Thank you.
Answer the question
In order to leave comments, you need to log in
In C, multithreading is usually implemented in the pthreads.h library.Multithreading is implemented by the operating system. pthreads is just a library to tell the operating system, they say, here's a separate thread for you to run
and C can be debugged as code in assemblerWell, yes, C is always compiled into assembler first, any disassembler can disassemble the finished program into pieces.
I read on the Internet that an assembler program can only run on one core.Show me where this nonsense is written
How is multithreading implemented in C?In C, it's just a multithreading interface. Multithreading itself is in the operating system.
since there is an equivalent assembler code for example in gnu debuggerIn both C and assembler, you just see "call pthread_create" and that's it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question