Subject: standards/22062: pthread_t defined as pointer, shall be arithmetic type
To: None <gnats-bugs@gnats.netbsd.org>
From: Klaus Klein <kleink@reziprozitaet.de>
List: netbsd-bugs
Date: 07/05/2003 17:43:20
>Number:         22062
>Category:       standards
>Synopsis:       pthread_t defined as pointer, shall be arithmetic type
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    standards-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 05 15:45:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Klaus Klein
>Release:        NetBSD 1.6T
>Organization:
Frobozz Magic Standards Company
>Environment:
n/a

>Description:
	The pthread_t type is currently being defined as

	    typedef struct pthread_st *pthread_t;

	per POSIX-2001, <sys/types.h>, "[pthread_t] shall be defined as
	[arithmetic type] of an appropriate lenght."

>How-To-Repeat:

>Fix:
	A possible fix could be changing it to an appropriately sized
	integer type (uintptr_t) and use type casting in private code.

	Comments?
>Release-Note:
>Audit-Trail:
>Unformatted: