How can I make several processes communicate in C?
Posted: Sat Jan 10, 2009 10:57 am
I am working on a CPU emulator which on certain preset breakpoints passes some parameters to an OS compatibility layer (like a Wine kind of thing). What this is mean to acheive is that a CP/M program may run in a linux environment, accessing files in the filesystem of the host machine, writing to the terminal of the host computer, and accessing other hardware (actual hardware on the host computer, or emulated) whilst the machine code of the application software itself runs on the emulated CPU.
Both the CPU engine and the OS compatibilty layer are to be written in C.
My problem is this: although I understand the logic behind the problem I'm trying to solve, and could implement it in PDP-8 assembler (if only the PDP-8 were powerful enough! ), I'm still only learning C and don't know about how to do some things integral to this idea's working.
How can I pass a semaphore to another process?
How can several processes have variables and so on in common? When the CPU engine calls the OS compatibility layer for a particular syscall, the OS compat layer will need to look at CPU registers and memory locations for parameters and so on.
How do put proper bullet points into this message?
Both the CPU engine and the OS compatibilty layer are to be written in C.
My problem is this: although I understand the logic behind the problem I'm trying to solve, and could implement it in PDP-8 assembler (if only the PDP-8 were powerful enough! ), I'm still only learning C and don't know about how to do some things integral to this idea's working.
How can I pass a semaphore to another process?
How can several processes have variables and so on in common? When the CPU engine calls the OS compatibility layer for a particular syscall, the OS compat layer will need to look at CPU registers and memory locations for parameters and so on.
How do put proper bullet points into this message?