Revision: 185 http://trac.macosforge.org/projects/libdispatch/changeset/185 Author: kvv@apple.com Date: 2010-02-17 21:44:47 -0800 (Wed, 17 Feb 2010) Log Message: ----------- fix linkage for pthread keys Modified Paths: -------------- trunk/src/Makefile.am trunk/src/shims/tsd.h Added Paths: ----------- trunk/src/shims/tsd.c Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2010-02-18 05:25:17 UTC (rev 184) +++ trunk/src/Makefile.am 2010-02-18 05:44:47 UTC (rev 185) @@ -19,7 +19,8 @@ libshims_la_SOURCES= \ shims/mach.c \ - shims/time.c + shims/time.c \ + shims/tsd.c libdispatch_la_CFLAGS=-Wall INCLUDES=-I$(top_builddir) -I$(top_srcdir) \ Added: trunk/src/shims/tsd.c =================================================================== --- trunk/src/shims/tsd.c (rev 0) +++ trunk/src/shims/tsd.c 2010-02-18 05:44:47 UTC (rev 185) @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2010 Apple Inc. All rights reserved. + * + * @APPLE_APACHE_LICENSE_HEADER_START@ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @APPLE_APACHE_LICENSE_HEADER_END@ + */ + +#include "internal.h" + +#if !HAVE_PTHREAD_KEY_INIT_NP +pthread_key_t dispatch_queue_key; +pthread_key_t dispatch_sema4_key; +pthread_key_t dispatch_cache_key; +pthread_key_t dispatch_bcounter_key; +#endif Modified: trunk/src/shims/tsd.h =================================================================== --- trunk/src/shims/tsd.h 2010-02-18 05:25:17 UTC (rev 184) +++ trunk/src/shims/tsd.h 2010-02-18 05:44:47 UTC (rev 185) @@ -35,13 +35,13 @@ //__PTK_LIBDISPATCH_KEY4 //__PTK_LIBDISPATCH_KEY5 #else -pthread_key_t dispatch_queue_key; -pthread_key_t dispatch_sema4_key; -pthread_key_t dispatch_cache_key; -pthread_key_t dispatch_bcounter_key; +extern pthread_key_t dispatch_queue_key; +extern pthread_key_t dispatch_sema4_key; +extern pthread_key_t dispatch_cache_key; +extern pthread_key_t dispatch_bcounter_key; #endif -#ifdef USE_APPLE_TSD_OPTIMIZATIONS +#if USE_APPLE_TSD_OPTIMIZATIONS #define SIMULATE_5491082 1 #ifndef _PTHREAD_TSD_OFFSET #define _PTHREAD_TSD_OFFSET 0