Click here to Skip to main content
15,918,243 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

For some reason I'm getting the warning implicit declaration of function ‘pthread_yield’. I already included in my code <pthread.h>. I'm running the program under Debian 7 32 bit.

According to the manual, I'm doing it right

http://man7.org/linux/man-pages/man3/pthread_yield.3.html[^]

Any help will be very much appreciated.

Thanks
Posted

1 solution

The following works for me:
C
#define _GNU_SOURCE
#include <pthread.h>

int main()
{

  pthread_yield();
  return 0;
}



compiled with the
gcc -Wall -o myprog myprog.c -lpthread

command line.
 
Share this answer
 
Comments
GiZmoDragonBack 14-Aug-13 8:40am    
Thanks,
Finally zero warnings!
CPallini 14-Aug-13 8:48am    
You are welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900