thrd_equal Subroutine

Purpose

This subroutine compares two threads.

Library

Standard C Library (libc.a)

Syntax

#include <threads.h>
int thrd_equal(thrd_t thr0, thrd_t thr1);

Description

The thrd_equal subroutine determines whether the thread identified by the thr0 parameter refers to the thread identified by the thr1 parameter.

Parameters

Item Description
thr0 Refers to the first thread to be compared.
thr1 Refers to the second thread to be compared.

Return Values

The thrd_equal subroutine returns zero if the thr0 thread and the thr1 thread refer to different threads. Otherwise, the thrd_equal subroutine returns a nonzero value.

Files

Item Description
threads.h Standard macros, data types, and subroutines are defined by the threads.h file.