public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: pthreads on cygwin
@ 2001-09-04  5:37 Jacob Vennervald Madsen
  2001-09-04  5:40 ` Robert Collins
  0 siblings, 1 reply; 12+ messages in thread
From: Jacob Vennervald Madsen @ 2001-09-04  5:37 UTC (permalink / raw)
  To: Robert Collins; +Cc: cygwin

I just want to add that the same code works on Linux.

Jacob

-----Original Message-----
From: Robert Collins [ mailto:robert.collins@itdomain.com.au ]
Sent: 4. september 2001 14:33
To: Jacob Vennervald Madsen
Cc: cygwin@cygwin.com
Subject: Re: pthreads on cygwin


On Tue, 2001-09-04 at 19:59, Jacob Vennervald Madsen wrote:
> Hi List
> 
> I'm trying to compile and run the Open Source Kannel gateway on
cygwin.
> It compiles ok but gives me problems when I try to run it.
> 
> This is the error I get:
> 2001-09-04 09:13:43 [1] PANIC: gwlib/gwthread-pthread.c:151:
> getthreadinfo: Assertion `pthread_equal(threadinfo->self,
> pthread_self())' failed.
> 
> And this is line 151 of the file gwlib/gwthread-pthread.c that gives
the
> problems:
> gw_assert(pthread_equal(threadinfo->self, pthread_self()));
> 
> Any ideas how to make this work on cygwin?
> If I comment this line out I can start the gateway but it freezes
after
> sending one SMS through the gateway.

Sounds to me like for some reason the threadinfo->self struct isn't the
variable used to create the thread.

Rob


--
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/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: pthreads on cygwin
  2001-09-04  5:37 pthreads on cygwin Jacob Vennervald Madsen
@ 2001-09-04  5:40 ` Robert Collins
  0 siblings, 0 replies; 12+ messages in thread
From: Robert Collins @ 2001-09-04  5:40 UTC (permalink / raw)
  To: Jacob Vennervald Madsen; +Cc: cygwin

On Tue, 2001-09-04 at 22:36, Jacob Vennervald Madsen wrote:
> I just want to add that the same code works on Linux.

Sure. You might want to try a developers snapshot of cygwin, if you're
not already. There was a bug in pthread_equal some months back, and that
is fixed in the developers snapshots. 

Rob


--
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/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: pthreads on cygwin
  2001-09-04  5:42 Jacob Vennervald Madsen
@ 2001-09-04  5:48 ` Robert Collins
  0 siblings, 0 replies; 12+ messages in thread
From: Robert Collins @ 2001-09-04  5:48 UTC (permalink / raw)
  To: Jacob Vennervald Madsen; +Cc: cygwin

On Tue, 2001-09-04 at 22:41, Jacob Vennervald Madsen wrote:
> I've already tried that but it gives me the same error.

Then I'd look into your code and see if it could be doing something
whereby the thread calling pthread_equal is _not_ the thread that set
threadinfo->self.

I've confirmed that pthread_self, pthread_create and pthread_equal are
behaving properly with the code in my samdbox. (which while somewhat out
of date should have the most recent pthread changes).

Rob 


--
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/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: pthreads on cygwin
@ 2001-09-04  5:42 Jacob Vennervald Madsen
  2001-09-04  5:48 ` Robert Collins
  0 siblings, 1 reply; 12+ messages in thread
From: Jacob Vennervald Madsen @ 2001-09-04  5:42 UTC (permalink / raw)
  To: Robert Collins; +Cc: cygwin

I've already tried that but it gives me the same error.

Jacob

-----Original Message-----
From: Robert Collins [ mailto:robert.collins@itdomain.com.au ]
Sent: 4. september 2001 14:41
To: Jacob Vennervald Madsen
Cc: cygwin@cygwin.com
Subject: RE: pthreads on cygwin


On Tue, 2001-09-04 at 22:36, Jacob Vennervald Madsen wrote:
> I just want to add that the same code works on Linux.

Sure. You might want to try a developers snapshot of cygwin, if you're
not already. There was a bug in pthread_equal some months back, and that
is fixed in the developers snapshots. 

Rob


--
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/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: pthreads on cygwin
  2001-09-04  3:00 Jacob Vennervald Madsen
@ 2001-09-04  5:32 ` Robert Collins
  0 siblings, 0 replies; 12+ messages in thread
From: Robert Collins @ 2001-09-04  5:32 UTC (permalink / raw)
  To: Jacob Vennervald Madsen; +Cc: cygwin

On Tue, 2001-09-04 at 19:59, Jacob Vennervald Madsen wrote:
> Hi List
> 
> I'm trying to compile and run the Open Source Kannel gateway on cygwin.
> It compiles ok but gives me problems when I try to run it.
> 
> This is the error I get:
> 2001-09-04 09:13:43 [1] PANIC: gwlib/gwthread-pthread.c:151:
> getthreadinfo: Assertion `pthread_equal(threadinfo->self,
> pthread_self())' failed.
> 
> And this is line 151 of the file gwlib/gwthread-pthread.c that gives the
> problems:
> gw_assert(pthread_equal(threadinfo->self, pthread_self()));
> 
> Any ideas how to make this work on cygwin?
> If I comment this line out I can start the gateway but it freezes after
> sending one SMS through the gateway.

Sounds to me like for some reason the threadinfo->self struct isn't the
variable used to create the thread.

Rob


--
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/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* pthreads on cygwin
@ 2001-09-04  3:00 Jacob Vennervald Madsen
  2001-09-04  5:32 ` Robert Collins
  0 siblings, 1 reply; 12+ messages in thread
From: Jacob Vennervald Madsen @ 2001-09-04  3:00 UTC (permalink / raw)
  To: cygwin

Hi List

I'm trying to compile and run the Open Source Kannel gateway on cygwin.
It compiles ok but gives me problems when I try to run it.

This is the error I get:
2001-09-04 09:13:43 [1] PANIC: gwlib/gwthread-pthread.c:151:
getthreadinfo: Assertion `pthread_equal(threadinfo->self,
pthread_self())' failed.

And this is line 151 of the file gwlib/gwthread-pthread.c that gives the
problems:
gw_assert(pthread_equal(threadinfo->self, pthread_self()));

Any ideas how to make this work on cygwin?
If I comment this line out I can start the gateway but it freezes after
sending one SMS through the gateway.

Best regards,
Jacob Vennervald Madsen
Mobile Systems Developer

GoPinocchio
Norrebrogade 45
DK-2200 Copenhagen
www.gopinocchio.com
+45 26750106

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

--
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/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: pthreads on Cygwin
  2001-01-23 13:44 pthreads on Cygwin Dave Brolley
@ 2001-01-23 14:06 ` Christopher Faylor
  0 siblings, 0 replies; 12+ messages in thread
From: Christopher Faylor @ 2001-01-23 14:06 UTC (permalink / raw)
  To: cygwin

On Tue, Jan 23, 2001 at 04:47:59PM -0500, Dave Brolley wrote:
>Looking at it a little more closely, it looks like pthread.h was written for Cygwin,
>and unconditionally defines all the pthread related types and functions, but is now
>depending on sys/features.h to set the _POSIX_* macros.

It isn't "now" depending on sys/features.h.  It has never, AFAIK, defined any
of the _POSIX_* macros.

As the FAQ states there is only limited support fo POSIX threads in
Cygwin.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: pthreads on Cygwin
@ 2001-01-23 13:44 Dave Brolley
  2001-01-23 14:06 ` Christopher Faylor
  0 siblings, 1 reply; 12+ messages in thread
From: Dave Brolley @ 2001-01-23 13:44 UTC (permalink / raw)
  To: cygwin; +Cc: Jeff Johnston

Looking at it a little more closely, it looks like pthread.h was written for Cygwin,
and unconditionally defines all the pthread related types and functions, but is now
depending on sys/features.h to set the _POSIX_* macros.

sys/types.h also defines defferent versions of these same types but only for
__rtems__and sys/features.h does define the _POSIX_* macros, but also only for
__rtems__.

Dave


-----------------------------------------

On Mon, Jan 22, 2001 at 06:13:46PM -0500, Dave Brolley wrote:
>Hi,
>
>According to the online documentation, basic pthread support is 
>available on Cygwin: 
> http://sources.redhat.com/cygwin/cygwin-api/std-posix.html#AEN85
>
>I've found and #included <pthread.h> in /usr/include/pthread.h, however,
><sys/features.h>, found in /usr/include/sys/features.h, only turns on 
>_POSIX_THREADS if
>a macro named __rtems__ is defined. Similarly for the thread support in 
><sys/types.h>.
>
>Is this a bug in the headers or is thread support really not there for 
>vanilla Cygwin? I'm using version 1.1.7 on Windows 95. (Actually, it's a 
>snapshot from Jan 10 -- I as trying to avoid the "cygwin hangs after 
>'sed' in 'libtool' during builds problem). I was told by an insider that 
><pthread.h> and <sys/features.h> were only recently added.

From the ChangeLog, pthread.h has been around for more than a year.
sys/features.h was introduced by Joel Sherrill on 2000-12-11, apparently
to handle rtems.  Apparently he didn't get the cygwin part right.

cgf


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: pthreads on Cygwin
  2001-01-22 15:10 Dave Brolley
@ 2001-01-22 19:01 ` Christopher Faylor
  0 siblings, 0 replies; 12+ messages in thread
From: Christopher Faylor @ 2001-01-22 19:01 UTC (permalink / raw)
  To: cygwin

On Mon, Jan 22, 2001 at 06:13:46PM -0500, Dave Brolley wrote:
>Hi,
>
>According to the online documentation, basic pthread support is 
>available on Cygwin: 
> http://sources.redhat.com/cygwin/cygwin-api/std-posix.html#AEN85
>
>I've found and #included <pthread.h> in /usr/include/pthread.h, however,
><sys/features.h>, found in /usr/include/sys/features.h, only turns on 
>_POSIX_THREADS if
>a macro named __rtems__ is defined. Similarly for the thread support in 
><sys/types.h>.
>
>Is this a bug in the headers or is thread support really not there for 
>vanilla Cygwin? I'm using version 1.1.7 on Windows 95. (Actually, it's a 
>snapshot from Jan 10 -- I as trying to avoid the "cygwin hangs after 
>'sed' in 'libtool' during builds problem). I was told by an insider that 
><pthread.h> and <sys/features.h> were only recently added.

From the ChangeLog, pthread.h has been around for more than a year.
sys/features.h was introduced by Joel Sherrill on 2000-12-11, apparently
to handle rtems.  Apparently he didn't get the cygwin part right.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 12+ messages in thread

* pthreads on Cygwin
@ 2001-01-22 15:10 Dave Brolley
  2001-01-22 19:01 ` Christopher Faylor
  0 siblings, 1 reply; 12+ messages in thread
From: Dave Brolley @ 2001-01-22 15:10 UTC (permalink / raw)
  To: cygwin; +Cc: jjohnstn

Hi,

According to the online documentation, basic pthread support is 
available on Cygwin: 
http://sources.redhat.com/cygwin/cygwin-api/std-posix.html#AEN85

I've found and #included <pthread.h> in /usr/include/pthread.h, however,
<sys/features.h>, found in /usr/include/sys/features.h, only turns on 
_POSIX_THREADS if
a macro named __rtems__ is defined. Similarly for the thread support in 
<sys/types.h>.

Is this a bug in the headers or is thread support really not there for 
vanilla Cygwin? I'm using version 1.1.7 on Windows 95. (Actually, it's a 
snapshot from Jan 10 -- I as trying to avoid the "cygwin hangs after 
'sed' in 'libtool' during builds problem). I was told by an insider that 
<pthread.h> and <sys/features.h> were only recently added.

Dave


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Pthreads on Cygwin
  2001-01-14 17:04 Pthreads " Georg Waldschmidt
@ 2001-01-15  7:18 ` Larry Hall (RFK Partners, Inc)
  0 siblings, 0 replies; 12+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-01-15  7:18 UTC (permalink / raw)
  To: Georg Waldschmidt, cygwin

At 08:04 PM 1/14/2001, Georg Waldschmidt wrote:
>Hello,
>I want to use pthread with Cygwin (not MinGW). But there is only a 
>pthread.h in cygwin/usr/include, but no semaphore.h etc. Are the 
>pthreads not shipped together with Cygwin ? 
>Also, I saw that many includes are mirrored in cygwin/usr/include and
>cygwin\cygwin-1.1.7-1\newlib\libc\include. Why ?
>
>Regards,
>Georg



Cygwin has some built-in thread support, though there are still bugs and
the implementation is not entirely complete.  If you're talking about using
the pthread package with Cygwin, you should check the email archives on 
this subject.  There has been allot of talk about this.  The standard 
response to the queries regarding the pthread package under Cygwin is that
it won't work.  The email archives can fill you in on all the discussion and
other individual efforts to use it.



Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Pthreads on Cygwin
@ 2001-01-14 17:04 Georg Waldschmidt
  2001-01-15  7:18 ` Larry Hall (RFK Partners, Inc)
  0 siblings, 1 reply; 12+ messages in thread
From: Georg Waldschmidt @ 2001-01-14 17:04 UTC (permalink / raw)
  To: cygwin

Hello,
I want to use pthread with Cygwin (not MinGW). But there is only a 
pthread.h in cygwin/usr/include, but no semaphore.h etc. Are the 
pthreads not shipped together with Cygwin ? 
Also, I saw that many includes are mirrored in cygwin/usr/include and
cygwin\cygwin-1.1.7-1\newlib\libc\include. Why ?

Regards,
Georg

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2001-09-04  5:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-04  5:37 pthreads on cygwin Jacob Vennervald Madsen
2001-09-04  5:40 ` Robert Collins
  -- strict thread matches above, loose matches on Subject: below --
2001-09-04  5:42 Jacob Vennervald Madsen
2001-09-04  5:48 ` Robert Collins
2001-09-04  3:00 Jacob Vennervald Madsen
2001-09-04  5:32 ` Robert Collins
2001-01-23 13:44 pthreads on Cygwin Dave Brolley
2001-01-23 14:06 ` Christopher Faylor
2001-01-22 15:10 Dave Brolley
2001-01-22 19:01 ` Christopher Faylor
2001-01-14 17:04 Pthreads " Georg Waldschmidt
2001-01-15  7:18 ` Larry Hall (RFK Partners, Inc)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).