Mercurial > libjeffpc
view include/jeffpc/config.h.in @ 841:d22bd44473d8
thread: handle FreeBSD and macOS arg differences for pthread name setting
Both OSes have the same function (pthread_setname_np), but their arguments
are slightly different. The FreeBSD version takes a pthread argument to
identify which thread's name should be changed, while the macOS function
always operates on the current thread.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Mon, 04 Oct 2021 22:31:19 -0400 |
parents | 3d25e6c09e9f |
children |
line wrap: on
line source
/* * Copyright (c) 2016-2021 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef __JEFFPC_CONFIG_H #define __JEFFPC_CONFIG_H #cmakedefine JEFFPC_CPU_BIG_ENDIAN #cmakedefine JEFFPC_DATAMODEL "${JEFFPC_DATAMODEL}" #cmakedefine JEFFPC_ILP32 #cmakedefine JEFFPC_LP64 #cmakedefine JEFFPC_HAVE___ASSERT_FREEBSD_STYLE #cmakedefine JEFFPC_HAVE___ASSERT_LINUX_STYLE #cmakedefine JEFFPC_HAVE_ARC4RANDOM #cmakedefine JEFFPC_HAVE_ARC4RANDOM_BUF #cmakedefine JEFFPC_HAVE_ASSFAIL #cmakedefine JEFFPC_HAVE_ADDRTOSYMSTR #cmakedefine JEFFPC_HAVE_PTHREAD_COND_RELTIMEDWAIT_NP #cmakedefine JEFFPC_HAVE_PTHREAD_SETNAME_NP_FREEBSD_STYLE #cmakedefine JEFFPC_HAVE_PTHREAD_SETNAME_NP_OSX_STYLE #cmakedefine JEFFPC_HAVE_REALLOCARRAY #cmakedefine JEFFPC_HAVE_RECALLOCARRAY #cmakedefine JEFFPC_HAVE_ALLOCA_H #cmakedefine JEFFPC_HAVE_PORT_H #cmakedefine JEFFPC_HAVE_SYS_DEBUG_H #cmakedefine JEFFPC_HAVE_EAI_ADDRFAMILY #cmakedefine JEFFPC_HAVE_EAI_NODATA #cmakedefine JEFFPC_HAVE_UMEM #cmakedefine JEFFPC_ERRNO_ECKSUM ${JEFFPC_ERRNO_ECKSUM} #cmakedefine JEFFPC_ERRNO_ENOTUNIQ ${JEFFPC_ERRNO_ENOTUNIQ} #cmakedefine JEFFPC_ERRNO_EEOF ${JEFFPC_ERRNO_EEOF} #cmakedefine JEFFPC_LOCK_TRACKING #cmakedefine JEFFPC_LOCK_DEP_COUNT ${JEFFPC_LOCK_DEP_COUNT} #cmakedefine JEFFPC_LOCK_STACK_DEPTH ${JEFFPC_LOCK_STACK_DEPTH} #cmakedefine JEFFPC_TREE_COMPACT ${JEFFPC_TREE_COMPACT} #endif