Solved

getting pthread to work

Posted on 1997-05-30
2
257 Views
Last Modified: 2013-12-15
I'm having trouble getting C/C++ programs using the pthread
libraries to work.  I notice that most of the definitions
in the various /usr/include/pthread/mit/*.h files are within
#if defined(PTHREAD_KERENEL) / #endif
Since those are the definitions I need and they aren't
working I obviously don't have the 'PTHREAD_KERNEL'.
I have Slackware Linux 3.1, with kernel version 2.0.27.
How do I get the kernel set up so I can use the pthread
library?  (I didn't see an option in the make config :(  )
0
Comment
Question by:gunder
2 Comments
 
LVL 1

Accepted Solution

by:
bencur earned 100 total points
Comment Utility
thread support is always compiled with the kernel,
it's a clone syscall, and there's no option in make config.

you probably should tell us what your compiler does,
what errors you get, and show us example of your code.
0
 

Author Comment

by:gunder
Comment Utility
First off, sorry it took so long to get back to you.  had a bad couple of weeks.

I see that your answer is correct and that I probably need to play with some things before I could post some specific questions about threaded programming under linux.  :)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now