Re: can pthread and pth coexist

2003-10-24 Thread Kevin Cosgrove

On 23 October 2003 at 14:42, Steve Alstrin [EMAIL PROTECTED] wrote:

 Yes you did miss something, but it's not your fault, heehee. Include the
 pthread.h file before any other system files and that should fix the
 problem.

OK, I just did that and it didn't work.  But, I fixed it after that.
Here's the story:

- I'm running Pth 1.4.1 on Mandrake 9.0
- The libpth14-devel package _doesn't_ include libpthread stuff
- I rebuilt libpth14-devel adding libpthread to it
- The Pth makefile doesn't install the .a nor .so.* files -- Mandrake
  caught this and fixed it in the RPM for the libpth stuff
- I copied the .a  .so.* files to their required location after
  doing the make install
- After all of the above mondo contained its own shutdown() function
  which conflicted with a system shutdown() function -- this didn't 
  conflict until I installed Pth's pthread API stuff.
- I renamed mondo's shutdown() to mondo_shutdown() and the conflict
  went away
- Mondo built just fine after that

Then I ran mondo and the non-working results looked _exactly_ like 
the non-working results I got when using pthreads from glibc 2.2.5.

Thanks for the Pth help!

Back to the drawing board for me


__
GNU Portable Threads (Pth)http://www.gnu.org/software/pth/
Development Site  http://www.ossp.org/pkg/lib/pth/
Distribution Files  ftp://ftp.gnu.org/gnu/pth/
Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager (Majordomo)   [EMAIL PROTECTED]


Re: can pthread and pth coexist

2003-10-24 Thread Kevin Cosgrove

On 24 October 2003 at 21:23, Steve Alstrin [EMAIL PROTECTED] wrote:

 Hum, this doesn't sound fun, however we ran into a condition with recursive
 use of mutexs that sounds familiar you might replace any mutex code in mondo
 with the following extra pthread_mutexattr_settype call.
 
 pthread_mutexattr_init(_mutex_attrs);
 pthread_mutexattr_settype(_mutex_attrs, PTHREAD_MUTEX_RECURSIVE_NP);
 pthread_mutex_init(_mutex, _mutex_attrs);
 
 You will have to go back to using native threads though.

No mutex stuff exists in mondo.  The whole of the pthread code in 
mondo is very small, maybe 1-2 dozen pthread calls.

Thanks


__
GNU Portable Threads (Pth)http://www.gnu.org/software/pth/
Development Site  http://www.ossp.org/pkg/lib/pth/
Distribution Files  ftp://ftp.gnu.org/gnu/pth/
Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager (Majordomo)   [EMAIL PROTECTED]


RE: can pthread and pth coexist

2003-10-23 Thread Steve Alstrin
Yes you did miss something, but it's not your fault, heehee. Include the
pthread.h file before any other system files and that should fix the
problem.

-Original Message-
From: Kevin Cosgrove [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 8:03 PM
To: [EMAIL PROTECTED]
Subject: Re: can pthread and pth coexist 



On 21 October 2003 at 14:19, Steve Alstrin [EMAIL PROTECTED] wrote:

 If you are doing this on Linux you can use the HARD system call method,
look
 at the config options, which when you link will use the pthread emulation
 api in pth threads.
 
 -Original Message-
  From: Thor Tall [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, October 21, 2003 5:02 AM
  To: [EMAIL PROTECTED]
  Subject: can pthread and pth coexist
  
  
  We are using COTS library which is using pthread and a
  number of other libraries which we can not recompile.
  These libraries are calling a number of system calls
  which there are pth replacements for.
  
  Are there any problems using both pthread and pth in
  the same program under linux redhat 7.3?
  
  I assume that the libraries which are performing
  non-pth system calls will influence the performance of
  the process i.e. the other threads in the process? can
  this be avoided? Can the fact that these libraries
  perform non-pth system calls cause problems for pth?
  and if so can these be overcome?


I tried the pth replacement for the pthread API a couple months back 
on my Mandrake 9.0 system when I was trying to build mondo  mindi 
(wonderful bare-metal recovery package) which has trouble with tape 
drives due to wacky pthread stuff.  I had a great deal of trouble 
with conflicting header files, many layers of conflicts in fact.  Did 
I miss some easy way around these conflicts?  I ended up giving up 
altogether.

Thanks


__
GNU Portable Threads (Pth)http://www.gnu.org/software/pth/
Development Site  http://www.ossp.org/pkg/lib/pth/
Distribution Files  ftp://ftp.gnu.org/gnu/pth/
Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager (Majordomo)   [EMAIL PROTECTED]
__
GNU Portable Threads (Pth)http://www.gnu.org/software/pth/
Development Site  http://www.ossp.org/pkg/lib/pth/
Distribution Files  ftp://ftp.gnu.org/gnu/pth/
Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager (Majordomo)   [EMAIL PROTECTED]


Re: can pthread and pth coexist

2003-10-22 Thread Kevin Cosgrove

On 21 October 2003 at 14:19, Steve Alstrin [EMAIL PROTECTED] wrote:

 If you are doing this on Linux you can use the HARD system call method, look
 at the config options, which when you link will use the pthread emulation
 api in pth threads.
 
 -Original Message-
  From: Thor Tall [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, October 21, 2003 5:02 AM
  To: [EMAIL PROTECTED]
  Subject: can pthread and pth coexist
  
  
  We are using COTS library which is using pthread and a
  number of other libraries which we can not recompile.
  These libraries are calling a number of system calls
  which there are pth replacements for.
  
  Are there any problems using both pthread and pth in
  the same program under linux redhat 7.3?
  
  I assume that the libraries which are performing
  non-pth system calls will influence the performance of
  the process i.e. the other threads in the process? can
  this be avoided? Can the fact that these libraries
  perform non-pth system calls cause problems for pth?
  and if so can these be overcome?


I tried the pth replacement for the pthread API a couple months back 
on my Mandrake 9.0 system when I was trying to build mondo  mindi 
(wonderful bare-metal recovery package) which has trouble with tape 
drives due to wacky pthread stuff.  I had a great deal of trouble 
with conflicting header files, many layers of conflicts in fact.  Did 
I miss some easy way around these conflicts?  I ended up giving up 
altogether.

Thanks


__
GNU Portable Threads (Pth)http://www.gnu.org/software/pth/
Development Site  http://www.ossp.org/pkg/lib/pth/
Distribution Files  ftp://ftp.gnu.org/gnu/pth/
Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager (Majordomo)   [EMAIL PROTECTED]


RE: can pthread and pth coexist

2003-10-21 Thread Steve Alstrin
If you are doing this on Linux you can use the HARD system call method, look
at the config options, which when you link will use the pthread emulation
api in pth threads.

-Original Message-
From: Thor Tall [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 5:02 AM
To: [EMAIL PROTECTED]
Subject: can pthread and pth coexist


We are using COTS library which is using pthread and a
number of other libraries which we can not recompile.
These libraries are calling a number of system calls
which there are pth replacements for.

Are there any problems using both pthread and pth in
the same program under linux redhat 7.3?

I assume that the libraries which are performing
non-pth system calls will influence the performance of
the process i.e. the other threads in the process? can
this be avoided? Can the fact that these libraries
perform non-pth system calls cause problems for pth?
and if so can these be overcome?

Thanks


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
__
GNU Portable Threads (Pth)http://www.gnu.org/software/pth/
Development Site  http://www.ossp.org/pkg/lib/pth/
Distribution Files  ftp://ftp.gnu.org/gnu/pth/
Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager (Majordomo)   [EMAIL PROTECTED]
__
GNU Portable Threads (Pth)http://www.gnu.org/software/pth/
Development Site  http://www.ossp.org/pkg/lib/pth/
Distribution Files  ftp://ftp.gnu.org/gnu/pth/
Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager (Majordomo)   [EMAIL PROTECTED]