davidgiven / ack

The Amsterdam Compiler Kit
http://tack.sf.net
Other
416 stars 59 forks source link

plat/msdos86: make getpid() use European MS-DOS's getpid syscall if it exists #253

Closed tkchia closed 2 years ago

tkchia commented 2 years ago

Apparently European MS-DOS 4.0 actually has a getpid syscall, which one can use to obtain a process id for the running process.

This proposed patch uses this syscall to implement the getpid () function, wherever it is supported.

On most versions of MS-DOS, this syscall does not exist, and getpid () can fall back on using the process's Program Segment Prefix (PSP) segment value as the process id, as before.

davidgiven commented 2 years ago

Merged --- thanks!