UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2009-10-07 05:14 PM

pankajdev
Member
Registered: 2009-07-15
Posts: 14

Re: gettid does not work on fedora

I want to get thread by gettid. I was written program on redhat 4 it works fine but when i have copied that program to fedora 64 bit it does not work. It gives error "gettid has not been declared". Can anybody please help me.

Offline

#2 2009-10-07 10:01 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: gettid does not work on fedora

The glibc wrapper for the gettid() systemcall is removed in later glibc versions.
Use syscall() to call it.

Offline

#3 2009-10-07 11:21 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,839
Website

Re: gettid does not work on fedora

Or, better yet, use something standard like pthread_self(), unless you really have
some need for the non-standard (and now deprecated) gettid()...

Offline

#4 2009-10-08 07:01 AM

pankajdev
Member
Registered: 2009-07-15
Posts: 14

Re: gettid does not work on fedora

Thanks for help .. syscall is working fine

Offline

Board footer

Powered by FluxBB