LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-04-2007, 02:52 PM   #1
Lothar Schwab
LQ Newbie
 
Registered: Aug 2007
Location: Minnesota, USA
Distribution: Lubuntu
Posts: 19

Rep: Reputation: 2
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?
 
Old 08-04-2007, 03:59 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"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."

In order to move from the first type of processing to the second You must have a hardware instruction available which both tests the wait condition and if necessary places the process in a wait state, all within the one instruction.

-------------------
Steve Stites
 
Old 08-05-2007, 12:04 AM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

You might want to have a look at "APR", the Apache Portable Runtime Project:

http://apr.apache.org/

It's a mature, comprehensive, highly regarded "abstraction layer" that probably already has most of what you're looking for.

Last edited by paulsm4; 08-05-2007 at 12:05 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create layer break on dual layer dvd 5matyb5 Linux - General 2 02-28-2011 07:29 PM
DVD Drives - Dual Layer or double layer? Groundhog1248 Linux - Hardware 2 09-23-2009 09:30 PM
LXer: The database abstraction framework strikes back LXer Syndicated Linux News 0 11-22-2006 04:21 PM
LXer: Linux: Reiser4 Internal Abstraction Layer LXer Syndicated Linux News 0 08-02-2006 11:54 PM
Dual Layer ISO onto 2 Single Layer Medias iammike SUSE / openSUSE 3 05-11-2005 05:15 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration