Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_equal(3c) [sunos man page]

pthread_equal(3C)														 pthread_equal(3C)

NAME
pthread_equal - compare thread IDs SYNOPSIS
cc -mt [ flag... ] file... -lpthread [ library... ] #include <pthread.h> int pthread_equal(pthread_t t1, pthread_t t2); The pthread_equal() function compares the thread IDs t1 and t2. The pthread_equal() function returns a non-zero value if t1 and t2 are equal. Otherwise, 0 is returned. If t1 or t2 is an invalid thread ID, the behavior is undefined. No errors are defined. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ pthread_create(3C), pthread_self(3C), attributes(5), standards(5) Solaris thread IDs do not require an equivalent function because the thread_t structure is an unsigned int. 23 Mar 2005 pthread_equal(3C)

Check Out this Related Man Page

PTHREAD_EQUAL(3)					     Linux Programmer's Manual						  PTHREAD_EQUAL(3)

NAME
pthread_equal - compare thread IDs SYNOPSIS
#include <pthread.h> int pthread_equal(pthread_t t1, pthread_t t2); Compile and link with -pthread. DESCRIPTION
The pthread_equal() function compares two thread identifiers. RETURN VALUE
If the two thread IDs are equal, pthread_equal() returns a nonzero value; otherwise, it returns 0. ERRORS
This function always succeeds. CONFORMING TO
POSIX.1-2001. NOTES
The pthread_equal() function is necessary because thread IDs should be considered opaque: there is no portable way for applications to directly compare two pthread_t values. SEE ALSO
pthread_create(3), pthread_self(3), pthreads(7) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2009-03-30 PTHREAD_EQUAL(3)
Man Page

6 More Discussions You Might Find Interesting

1. Programming

List of Thread IDs of a process

Hello, Can some one tell how to read the thread IDs of the current process in Sun Solaris. Any help will be appreciated. regards, Murali (0 Replies)
Discussion started by: hmurali
0 Replies

2. Programming

[c] is -lpthread correct option?

I read somewhere that I should use -pthread instead of -lpthread as compiler/linker flag, or define _REENTRANT. Is this incorrect to use only -lpthread? (I use gcc) (5 Replies)
Discussion started by: dawwin
5 Replies

3. Programming

pthread_create

The prototype for pthread_create function is like this:- int pthread_create(pthread_t *thread,pthread_attr_t *attr,void *(*start routine),void *arg); Q.1 .Why the return type of the start_routine must be void*?? Q.2. Why should we pass arg by converting into void * only ?? Thank You (3 Replies)
Discussion started by: sunil_abhay
3 Replies

4. UNIX for Dummies Questions & Answers

Difference between handle to the thread HANDLE and thread identifier pthread_t

This question might be silly but its confusing me a bit: What is the difference between handle to the thread HANDLE and thread identifier pthread_t? ---------- Post updated at 01:52 PM ---------- Previous update was at 01:48 PM ---------- Sorry I saw details and HANDLE is in windows and... (0 Replies)
Discussion started by: rupeshkp728
0 Replies

5. HP-UX

converting void pointer to pthread_t on HPUX Itanium

i am trying to convert void pointer to pthread_t on hpux-itanium 64 bit which fails as below "src/file.cpp", line 88: error #2171: invalid type conversion pthread_t tid = reinterpret_cast<pthread_t>(m_threadId); 1 error detected in the compilation of "src/file.cpp" ... (0 Replies)
Discussion started by: skyineyes
0 Replies

6. Solaris

Need command

I have two files File1, File2. File1 has whole list of IDs and File2 has a limited IDs. i need to compare these two files and take the IDs which are not present in File2 but present in File1. can someone tell me a command. (3 Replies)
Discussion started by: JSKOBS
3 Replies