Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Semaphore and/or POSIX in OS/2

Posted on 2003-11-03
16
Medium Priority
?
1,193 Views
Last Modified: 2013-11-15
Does anyone know if OS/2 supports POSIX functions?

If not, what does it have available for Semaphore?
0
Comment
Question by:Axter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
16 Comments
 
LVL 86

Assisted Solution

by:jkr
jkr earned 1600 total points
ID: 9676038
Yes, it does - but the POSIX subsystem of OS/2 used to be 16bit. From the top of my head, I remember too many, but at least the names of the few saved me from booting&starting a Watcom compile on a P100/32MB :o)

See http://www.edm2.com/os2api/index.html#Semaphores
0
 
LVL 86

Expert Comment

by:jkr
ID: 9676041
"I remember too many" -> "I don't remember too many OS/2 APIs" :o)
0
 
LVL 30

Author Comment

by:Axter
ID: 9676090
Thanks for the link jkr,
However, the link you posted shows non-POSIX functions for semaphores.

Does OS/2 support both non-POSIX and POSIX semaphore functions, or does it only have non-POSIX functions?
0
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
LVL 86

Expert Comment

by:jkr
ID: 9676107
Hum, the link covers the OS/2 API on semaphores. POSIX-wise, *IIRC* they stopped at an implementation level that was far from being productive. But, hey, I haven't written any code for OS/2 since '96, so there might have been some innovations going on, but *I*'d go for the API.
0
 
LVL 86

Expert Comment

by:jkr
ID: 9676126
BTW, I just found that there is a "pthreads" lib for OS/2 also, they are very likely to implement semaphores.

0
 
LVL 30

Author Comment

by:Axter
ID: 9676189
OK,
I'm want to leave this question open for at least a day, so as to see if anyone else has any more good links or info to add.

Did you know that many ATM machines still use OS/2?
I thought this was a dead OS.
0
 
LVL 86

Expert Comment

by:jkr
ID: 9676205
>>Did you know that many ATM machines still use OS/2?
>>I thought this was a dead OS.

Sure I do - but, at these times, the APIs were superb :o)

>>I'm want to leave this question open for at least a day

Take you time, someone might happen to be more recently involved with my once favourite OS :-(
0
 
LVL 30

Author Comment

by:Axter
ID: 9676287
>>Take you time, someone might happen to be more recently involved with my once favourite OS :-(

So what made this once your favourite OS?
What did it have or had that made it preferable?

I’m just curious, and I know very little about it.
This is my first time working with it.

0
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 400 total points
ID: 9676385
> Did you know that many ATM machines still use OS/2?

Yes, but they are rapidly being replaced by Microsoft Windows - based implementation:
http://www.computerworld.com/networkingtopics/networking/os/story/0,10801,83884,00.html?from=imutopicheads

My local Bank of America ATMs have had all their software replaced recently.
I now have to press 30% more buttons to do the same thing.  Transactions seem to
take longer, but that gives me more time to enjoy the ATM commercial advertisements.

How long until someone encodes a Windows Worm on the mag stripe of an ATM card?

0
 
LVL 30

Author Comment

by:Axter
ID: 9676790
>>Yes, but they are rapidly being replaced by Microsoft Windows - based implementation:
>>http://www.computerworld.com/networkingtopics/networking/os/story/0,10801,83884,00.html?from=imutopicheads

Some are being replaced by Windows NT, but they're being replace gradually.


>>I now have to press 30% more buttons to do the same thing.  Transactions seem to
>>take longer, but that gives me more time to enjoy the ATM commercial advertisements

More then likely, the program is slow because of poor programming, and not because of the OS.
The extra buttons are also caused by poor programming.
0
 
LVL 30

Author Comment

by:Axter
ID: 9676822
brettmjohnson,

Very interesting article.
0
 
LVL 86

Expert Comment

by:jkr
ID: 9678584
>>So what made this once your favourite OS?
>>What did it have or had that made it preferable?

At *that* time (~'92, before NT3.1 hit the shelves), it was the only PC OS with preemptive multitasking and a full 32bit protected address space. When you were coding for 16bit Windows before, that was a big advantage.
0
 
LVL 4

Expert Comment

by:YuriPutivsky
ID: 9680487
Take a look at the portable code based on pthreads
http://www.terimber.com/text/opensrc/thread.html
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 1600 total points
ID: 9680572
Found it, finally:

ftp://ftp.netlabs.org/pub/pthreads/ "POSIX PTHREADS for OS/2 EMX rel 6"
0
 
LVL 30

Author Comment

by:Axter
ID: 9683816
Thanks everyone for your input.

Hmmm!

Sorry jkr, I meant to select your first comment as the accepted answer, and the other two comments as assist.
You still got awarded most of the points.

I couldn't compile the OS2 semaphore functions that was posted in your first link, but I was able to find similar OS2 functions by searching the header files.
0
 
LVL 86

Expert Comment

by:jkr
ID: 9683876
>>Sorry jkr

No prob at all :o)
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question