thread_.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2020 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004 
00005   You may not use this file except in compliance with the License.  You may
00006   obtain a copy of the License at
00007 
00008     https://imagemagick.org/script/license.php
00009 
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   MagickCore private methods for internal threading.
00017 */
00018 #ifndef MAGICKCORE_THREAD_H
00019 #define MAGICKCORE_THREAD_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__MINGW32__)
00026 #include <intsafe.h>
00027 #endif
00028 
00029 #if defined(MAGICKCORE_THREAD_SUPPORT)
00030 typedef pthread_t MagickThreadType;
00031 #elif defined(MAGICKCORE_WINDOWS_SUPPORT)
00032 typedef DWORD MagickThreadType;
00033 #else
00034 typedef pid_t MagickThreadType;
00035 #endif
00036 
00037 #if defined(MAGICKCORE_THREAD_SUPPORT)
00038 typedef pthread_key_t MagickThreadKey;
00039 #elif defined(MAGICKCORE_WINDOWS_SUPPORT)
00040 typedef DWORD MagickThreadKey;
00041 #else
00042 typedef void *MagickThreadKey;
00043 #endif
00044 
00045 extern MagickExport MagickBooleanType
00046   CreateMagickThreadKey(MagickThreadKey *,void (*destructor)(void *)),
00047   DeleteMagickThreadKey(MagickThreadKey),
00048   SetMagickThreadValue(MagickThreadKey,const void *);
00049 
00050 extern MagickExport void
00051   *GetMagickThreadValue(MagickThreadKey);
00052 
00053 /* Deprecated */
00054 extern MagickExport MagickBooleanType
00055   MagickCreateThreadKey(MagickThreadKey *),
00056   MagickDeleteThreadKey(MagickThreadKey),
00057   MagickSetThreadValue(MagickThreadKey,const void *);
00058 
00059 extern MagickExport void
00060   *MagickGetThreadValue(MagickThreadKey);
00061 
00062 #if defined(__cplusplus) || defined(c_plusplus)
00063 }
00064 #endif
00065 
00066 #endif

Generated on 3 Aug 2020 for MagickCore by  doxygen 1.6.1