gdtoaimp.h (113279) | gdtoaimp.h (116652) |
---|---|
1/**************************************************************** 2 3The author of this software is David M. Gay. 4 5Copyright (C) 1998-2000 by Lucent Technologies 6All Rights Reserved 7 8Permission to use, copy, modify, and distribute this software and --- 12 unchanged lines hidden (view full) --- 21SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 22WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 23IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 24ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 25THIS SOFTWARE. 26 27****************************************************************/ 28 | 1/**************************************************************** 2 3The author of this software is David M. Gay. 4 5Copyright (C) 1998-2000 by Lucent Technologies 6All Rights Reserved 7 8Permission to use, copy, modify, and distribute this software and --- 12 unchanged lines hidden (view full) --- 21SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 22WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 23IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 24ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 25THIS SOFTWARE. 26 27****************************************************************/ 28 |
29/* $FreeBSD: head/contrib/gdtoa/gdtoaimp.h 113279 2003-04-09 06:04:35Z das $ */ | 29/* $FreeBSD: head/contrib/gdtoa/gdtoaimp.h 116652 2003-06-21 08:20:14Z das $ */ |
30 31/* This is a variation on dtoa.c that converts arbitary binary 32 floating-point formats to and from decimal notation. It uses 33 double-precision arithmetic internally, so there are still 34 various #ifdefs that adapt the calculations to the native 35 double-precision arithmetic (any of IEEE, VAX D_floating, 36 or IBM mainframe arithmetic). 37 --- 145 unchanged lines hidden (view full) --- 183#include "stdio.h" 184#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);} 185#endif 186 187#include "limits.h" 188#include "stdlib.h" 189#include "string.h" 190#include "libc_private.h" | 30 31/* This is a variation on dtoa.c that converts arbitary binary 32 floating-point formats to and from decimal notation. It uses 33 double-precision arithmetic internally, so there are still 34 various #ifdefs that adapt the calculations to the native 35 double-precision arithmetic (any of IEEE, VAX D_floating, 36 or IBM mainframe arithmetic). 37 --- 145 unchanged lines hidden (view full) --- 183#include "stdio.h" 184#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);} 185#endif 186 187#include "limits.h" 188#include "stdlib.h" 189#include "string.h" 190#include "libc_private.h" |
191#include "spinlock.h" | |
192 | 191 |
192#include "namespace.h" 193#include <pthread.h> 194#include "un-namespace.h" 195 |
|
193#ifdef KR_headers 194#define Char char 195#else 196#define Char void 197#endif 198 199#ifdef MALLOC 200extern Char *MALLOC ANSI((size_t)); --- 259 unchanged lines hidden (view full) --- 460#else 461#define ULbits 16 462#define kshift 4 463#define kmask 15 464#define ALL_ON 0xffff 465#endif 466 467#define MULTIPLE_THREADS | 196#ifdef KR_headers 197#define Char char 198#else 199#define Char void 200#endif 201 202#ifdef MALLOC 203extern Char *MALLOC ANSI((size_t)); --- 259 unchanged lines hidden (view full) --- 463#else 464#define ULbits 16 465#define kshift 4 466#define kmask 15 467#define ALL_ON 0xffff 468#endif 469 470#define MULTIPLE_THREADS |
468extern spinlock_t __gdtoa_locks[2]; 469#define ACQUIRE_DTOA_LOCK(n) do { \ 470 if (__isthreaded) \ 471 _SPINLOCK(&__gdtoa_locks[n]); \ | 471extern pthread_mutex_t __gdtoa_locks[2]; 472#define ACQUIRE_DTOA_LOCK(n) do { \ 473 if (__isthreaded) \ 474 _pthread_mutex_lock(&__gdtoa_locks[n]); \ |
472} while(0) | 475} while(0) |
473#define FREE_DTOA_LOCK(n) do { \ 474 if (__isthreaded) \ 475 _SPINUNLOCK(&__gdtoa_locks[n]); \ | 476#define FREE_DTOA_LOCK(n) do { \ 477 if (__isthreaded) \ 478 _pthread_mutex_unlock(&__gdtoa_locks[n]); \ |
476} while(0) 477 478#define Kmax 15 479 480 struct 481Bigint { 482 struct Bigint *next; 483 int k, maxwds, sign, wds; --- 205 unchanged lines hidden --- | 479} while(0) 480 481#define Kmax 15 482 483 struct 484Bigint { 485 struct Bigint *next; 486 int k, maxwds, sign, wds; --- 205 unchanged lines hidden --- |