Newer
Older
snipet / jpcc / trunk / modules / 00_com / osw / include / osw_threads.h
/**
 * @file  osw_threads.h
 * @brief osw Thread ヘッダー
 * osw のスレッドに関する機能をまとめたヘッダーファイルです.
 *
 * Copyright (c)  2003 - 2015  Nomura Kei
 * License : THE MIT License <http://opensource.org/licenses/mit-license.php>
 */
#ifndef OSW_THREADS_H
#define OSW_THREADS_H


#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
/* =============================================================================
 *  C11 はスレッドをサポートしているため, 単に threads.h を読み込む.
 * =============================================================================
 */
#include <threads.h>

#else
/* =============================================================================
 *  C11 以外
 * =============================================================================
 */
#if defined(__GNUC__)
#define _Thread_local	__thread
#elif defined(_MSV_VER)
#define _Thread_local	__declspec(thread)
#else
#define _Thread_local	__thread
#endif


#endif	/* C11				*/

#endif	/* OSW_THREADS_H	*/