2008-01-18 04:40:44     Why can not find the "pthread.h" and "pthread.c" in uClinux-dist?

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-01-18 04:40:44     Why can not find the "pthread.h" and "pthread.c" in uClinux-dist?

vera sun (CHINA)

Message: 49774   

 

I am now developing a program with multithread. I want it scheduled it by using priority. I have heard that the schedule strategy in uclinux 2.6 for blackfin  has been modified to enhance the performance in real time task. Is that true?

 

However, I am not very familiar with the function prototypes under uClinux, so I want to refer to the source code as "pthread.c " and "pthread.h". But why I can not find them in uClinux-dist ? Where is it? Why? What I should refer to?

 

Thank you!

TranslateQuoteReplyEditDelete

 

 

2008-01-18 05:16:36     Re: Why can not find the "pthread.h" and "pthread.c" in uClinux-dist?

Mike Frysinger (UNITED STATES)

Message: 49775    the scheduler has seen great improvements in Linux 2.6 compared to Linux 2.4

 

i dont know what files you're referring to when you say "pthread.c" and "pthread.h" as the kernel itself has no such files at all ... the kernel does process scheduling and threads are merely special processes.

 

the userspace C library provides a pthread.h, but the function API is the same as any POSIX compliant platform

QuoteReplyEditDelete

 

 

2008-01-18 06:43:51     Re: Why can not find the "pthread.h" and "pthread.c" in uClinux-dist?

vera sun (CHINA)

Message: 49797   

 

Hi Mike

 

When I use the API such as "pthread_attr_setschedpolicy()", but I don't realy know exactly how many parameter should be passed in this function. Or what type of its return value.

 

I have googled some document describe how to use these function, but they are not very exactily and clearly .  So I want to see the source code to confirm. That is why I want to find the .c and .h in uClinux source code myself.

 

But I can find neither pthread.h nor pthread.c under linux source code path.  I didn't find them ,not refer to other.^_^

 

 

 

So there is only a file nemed pthread.h in /user ?

 

Thank you

TranslateQuoteReplyEditDelete

 

 

2008-01-18 06:54:58     Re: Why can not find the "pthread.h" and "pthread.c" in uClinux-dist?

Mike Frysinger (UNITED STATES)

Message: 49798    just read the man page then.  on any sane linux system, run:

man pthread_attr_setschedpolicy

 

or refer to the original POSIX documentation:

http://www.opengroup.org/onlinepubs/009695399/basedefs/pthread.h.html

 

either way, you will not find the pthread source code readable as it is full of internal tricks that takes time to get familiar with.  these files are not packaged with the uClinux distribution as that doesnt make sense to place them there ... these files are part of the toolchain/C library, not part of the userland application distribution.

Attachments

    Outcomes