delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/22/17:45:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <001501c2aa0b$cd7934b0$3c01a8c0@jungle>
From: "Jim" <jbuckeyne AT greater DOT net>
To: "antreas z" <antreas_z AT hotmail DOT com>, <cygwin AT cygwin DOT com>
References: <F29AZEHCIRjWZpyZCv500022968 AT hotmail DOT com>
Subject: Re: semaphores
Date: Sun, 22 Dec 2002 14:45:17 -0800
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2800.1106

not supported in official lines, and rumor has it there's a replacement in
the works, but noone's claiming ownership of said project.

http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/

----- Original Message -----
From: "antreas z" <antreas_z AT hotmail DOT com>
To: <cygwin AT cygwin DOT com>
Sent: Sunday, December 22, 2002 10:43 AM
Subject: semaphores


>
>
>
> hi.I'm new to this project and i have much more to learn about it.But i
have
> a very urgent question.When i try to compile the following code which is
> compiled succesfully on a Sun Unix maschine i get the following error
> synch.h no such file
> sys/ipc.h no such file
> sema_t undeclared.
> Can u tell me which libraries i have to work with so that i can use
> semaphores??
> thanx.
>
> #include <synch.h>
> #include <sys/types.h>
> #include <sys/ipc.h>
>
> extern int errno;
> main()
> {
> /*sema_t spreal; */
> sema_t sp;
> int retval;
>
>   /* Initialize the semaphore. */
>   retval = sema_init(&sp,2, USYNC_PROCESS, (void*)0 );
>   if (retval != 0) {
> perror("Couldn't initialize.");
> exit(3);
>   }
>
>   retval = sema_trywait(&sp);
>   printf("Did trywait. Returned %d >\n", retval); getchar();
>
>   retval = sema_trywait(&sp);
>   printf("Did trywait. Returned %d >\n", retval); getchar();
>
>   retval = sema_trywait(&sp);
>   printf("Did trywait. Returned %d >\n", retval); getchar();
>
>   sema_destroy(&sp);
>
> }
>
>
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 3 months FREE*.
>
http://join.msn.com/?page=features/virus&xAPID=42&PS=47575&PI=7324&DI=7474&S
U=
>
http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_eliminatevi
ruses_3mf
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019