Project

General

Profile

Actions

Bug #6993

closed

DEFAULT_TYPE should be probably be removed from pthread.h

Added by Richard PALO about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
lib - userland libraries
Start date:
2016-05-24
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

pthread.h has the following:

#define    _DEFAULT_TYPE             PTHREAD_PROCESS_PRIVATE
#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
#define    DEFAULT_TYPE            _DEFAULT_TYPE
#endif

as this is only seen :

head/pthread.h:#define  _DEFAULT_TYPE                   PTHREAD_PROCESS_PRIVATE
head/pthread.h:#define  DEFAULT_TYPE                    _DEFAULT_TYPE
head/pthread.h: {{0, 0, 0, _DEFAULT_TYPE, _MUTEX_MAGIC}, {{{0}}}, 0}
head/pthread.h: {{{0, 0, 0, 0}, _DEFAULT_TYPE, _COND_MAGIC}, 0}
head/pthread.h: {0, _DEFAULT_TYPE, _RWL_MAGIC, PTHREAD_MUTEX_INITIALIZER,       \
lib/libc/port/threads/pthr_barrier.c:           type = DEFAULT_TYPE;
lib/libc/port/threads/pthr_cond.c:      ap->pshared = DEFAULT_TYPE;
lib/libc/port/threads/pthr_cond.c:              type = DEFAULT_TYPE;
lib/libc/port/threads/pthr_mutex.c:     ap->pshared = DEFAULT_TYPE;
lib/libc/port/threads/pthr_mutex.c:             type = DEFAULT_TYPE | PTHREAD_MUTEX_DEFAULT |
lib/libc/port/threads/pthr_rwlock.c:    ap->pshared = DEFAULT_TYPE;
lib/libc/port/threads/pthr_rwlock.c:            type = DEFAULT_TYPE;

and
uts/intel/io/dnet/dnet.c:                               dnetp->vendor_21140 = DEFAULT_TYPE;
uts/intel/io/dnet/dnet.h:enum   { DEFAULT_TYPE, COGENT_EM_TYPE, ASANTE_TYPE};

the man page doesn't document this at all so it should be safe to remove
and convert gate usage to _DEFAULT_TYPE if not directly to PTHREAD_PROCESS_PRIVATE
as do other pthread implementations.


Files

Actions

Also available in: Atom PDF