~ubuntu-branches/ubuntu/natty/imagemagick/natty-security

« back to all changes in this revision

Viewing changes to magick/thread.c

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-11-27 09:32:04 UTC
  • mfrom: (6.2.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091127093204-m038t8kmxk6uvc25
Tags: 7:6.5.7.8-1ubuntu1
* Merge from debian testing.  Remaining changes:
  - Don't build-dep on librsvg, it brings in excessive dependencies
  - Don't build-dep on liblqr-1-0-dev, it is in universe

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
{
66
66
#if defined(MAGICKCORE_HAVE_PTHREAD)
67
67
  return(pthread_key_create(key,NULL) == 0 ? MagickTrue : MagickFalse);
68
 
#elif defined(MAGICKORE_HAVE_WINTHREADS)
 
68
#elif defined(MAGICKCORE_HAVE_WINTHREADS)
69
69
  *key=TlsAlloc();
70
70
  return(*key != TLS_OUT_OF_INDEXES ? MagickTrue : MagickFalse);
71
71
#else
100
100
{
101
101
#if defined(MAGICKCORE_HAVE_PTHREAD)
102
102
  return(pthread_key_delete(key) == 0 ? MagickTrue : MagickFalse);
103
 
#elif defined(MAGICKORE_HAVE_WINTHREADS)
 
103
#elif defined(MAGICKCORE_HAVE_WINTHREADS)
104
104
  return(TlsFree(key) != 0 ? MagickTrue : MagickFalse);
105
105
#else
106
106
  key=(MagickThreadKey) RelinquishMagickMemory(key);
135
135
{
136
136
#if defined(MAGICKCORE_HAVE_PTHREAD)
137
137
  return(pthread_getspecific(key));
138
 
#elif defined(MAGICKORE_HAVE_WINTHREADS)
 
138
#elif defined(MAGICKCORE_HAVE_WINTHREADS)
139
139
  return(TlsGetValue(key));
140
140
#else
141
141
  return((void *) (*key));
172
172
{
173
173
#if defined(MAGICKCORE_HAVE_PTHREAD)
174
174
  return(pthread_setspecific(key,value) == 0 ? MagickTrue : MagickFalse);
175
 
#elif defined(MAGICKORE_HAVE_WINTHREADS)
 
175
#elif defined(MAGICKCORE_HAVE_WINTHREADS)
176
176
  return(TlsSetValue(key,(void *) value) != 0 ? MagickTrue : MagickFalse);
177
177
#else
178
178
  *key=(unsigned long) value;