LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-08-2007, 08:35 AM   #1
girish_hilage
Member
 
Registered: Oct 2003
Posts: 78

Rep: Reputation: 15
pthread source code


Hi,

Can anybody please let me know wherefrom can I get the Pthread source code for BSD version?

Regards,
Girish
 
Old 10-09-2007, 05:02 PM   #2
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
good question and we here at linux questions i think don't know the answer.
there are lots of pthread implementations.
Linux threads is now a part of glibc so it seems to use linuxthreads you would have to use a glibc based bsd variant.
anyway the linuxthreads code is in the GNU glibc package.
 
Old 10-12-2007, 10:01 AM   #3
girish_hilage
Member
 
Registered: Oct 2003
Posts: 78

Original Poster
Rep: Reputation: 15
Thanks for your reply.
But, I have one confusion.
The pthread library (provided by glibc-devel) which I use on my linux machine is a pthread or linux thread?
i.e. if linux threads are nothing but pthreads itself?
or linux threads is different implementation than pthreads?
I have this confusion because, I think thread libraries on solaris/other operating systems have the library function names starting with thr_*() or something like that. So, I thought linux threads would also have names starting with lthread_*() just like pthread_*() for POSIX threads. Hence my impression is, linux threads is a different library than pthread but could not get any document clearly specifying this. Some documents specify that linux threads is an implementation of posix threads.
So, is POSIX threads is just a standard and linux threads is built(with few exceptions) as per this standard?
 
Old 10-12-2007, 12:58 PM   #4
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
yes POSIX threads is just a standard that defines an API and libraries comply with or do not comply with the standard.
Binary Incompatabilities exist between the libraries mostly only to the extent they do not comply with the POSIX standard.

Linux currently uses (since around 2003) the NPTL "native POSIX threading library" now included in the GNU C library

linuxthreads was the old GNU library we used before NPTL.

you can look at the interface /usr/local/pthread.h

it is the same interface from the older linuxthreads library.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Krugle offers code search engine for open source, with open source LXer Syndicated Linux News 0 02-27-2007 08:04 AM
LXer: Voip Encryption, source code open source LXer Syndicated Linux News 0 07-09-2006 03:21 PM
How to convert Assembly code to "C" source code ssg14j Programming 2 08-01-2005 12:48 PM
pthread library Source RPM samirs Linux - Newbie 1 06-03-2005 01:58 PM


All times are GMT -5. The time now is 12:01 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration