Platfom abstraction layer
Hi,
for quite some time I am already looking at the right
set of concepts for a platform abstraction layer that
preserves most of the good capabilities of both the Win32
API but also the standard UNIX programming API. In particlar
I am looking for these features:
1. Wait on heterogeneous kernel objects. Windows allows for that
I can wait on a kernel mutex, a socket handle and a thread
or process handle at the same time.
The standard UNIX API only allows to wait on *either*
IPC objects (semaphores for instance) *or* on file descriptors.
2. Windows limits the number of handles I can wait on to
64 whereas Unix/Linux have a much higher number of file
descriptors I can wait on via poll or select.
Wine emulates the Win32 API by putting the OS style state into
a process and API calls are translated into roundtrips (via a pipe)
to this server process.
I have had a discussion with a co-worker already on putting such
state in shared memory and have processes formulate their wait
condition in shared memory and each process performing a modification
would need to check and wake up waiting processes according to
their wait condition.
Has anybody investigated concepts along these lines?
|