亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? implement.h

?? 7z 移植到windows mobile上,完整的程序并能運行,包括了pthread 多線程庫移植windows mobile上的使用及實例.
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*
 * implement.h
 *
 * Definitions that don't need to be public.
 *
 * Keeps all the internals out of pthread.h
 *
 * --------------------------------------------------------------------------
 *
 *      Pthreads-win32 - POSIX Threads Library for Win32
 *      Copyright(C) 1998 John E. Bossom
 *      Copyright(C) 1999,2005 Pthreads-win32 contributors
 * 
 *      Contact Email: rpj@callisto.canberra.edu.au
 * 
 *      The current list of contributors is contained
 *      in the file CONTRIBUTORS included with the source
 *      code distribution. The list can also be seen at the
 *      following World Wide Web location:
 *      http://sources.redhat.com/pthreads-win32/contributors.html
 * 
 *      This library is free software; you can redistribute it and/or
 *      modify it under the terms of the GNU Lesser General Public
 *      License as published by the Free Software Foundation; either
 *      version 2 of the License, or (at your option) any later version.
 * 
 *      This library is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *      Lesser General Public License for more details.
 * 
 *      You should have received a copy of the GNU Lesser General Public
 *      License along with this library in the file COPYING.LIB;
 *      if not, write to the Free Software Foundation, Inc.,
 *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 */

#ifndef _IMPLEMENT_H
#define _IMPLEMENT_H

#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x400

#include <windows.h>

/*
 * In case windows.h doesn't define it (e.g. WinCE perhaps)
 */
#ifdef WINCE
typedef VOID (APIENTRY *PAPCFUNC)(DWORD dwParam);
#endif

/*
 * note: ETIMEDOUT is correctly defined in winsock.h
 */
#include <winsock.h>

/*
 * In case ETIMEDOUT hasn't been defined above somehow.
 */
#ifndef ETIMEDOUT
#  define ETIMEDOUT 10060	/* This is the value in winsock.h. */
#endif

#if !defined(malloc)
#include <malloc.h>
#endif

#if !defined(INT_MAX)
#include <limits.h>
#endif

/* use local include files during development */
#include "semaphore.h"
#include "sched.h"

#if defined(HAVE_C_INLINE) || defined(__cplusplus)
#define INLINE inline
#else
#define INLINE
#endif

#if defined (__MINGW32__) || (_MSC_VER >= 1300)
#define PTW32_INTERLOCKED_LONG long
#define PTW32_INTERLOCKED_LPLONG long*
#else
#define PTW32_INTERLOCKED_LONG PVOID
#define PTW32_INTERLOCKED_LPLONG PVOID*
#endif

#if defined(__MINGW32__)
#include <stdint.h>
#elif defined(__BORLANDC__)
#define int64_t ULONGLONG
#else
#define int64_t _int64
#endif

typedef enum
{
  /*
   * This enumeration represents the state of the thread;
   * The thread is still "alive" if the numeric value of the
   * state is greater or equal "PThreadStateRunning".
   */
  PThreadStateInitial = 0,	/* Thread not running                   */
  PThreadStateRunning,		/* Thread alive & kicking               */
  PThreadStateSuspended,	/* Thread alive but suspended           */
  PThreadStateCancelPending,	/* Thread alive but is                  */
  /* has cancelation pending.        */
  PThreadStateCanceling,	/* Thread alive but is                  */
  /* in the process of terminating        */
  /* due to a cancellation request        */
  PThreadStateException,	/* Thread alive but exiting             */
  /* due to an exception                  */
  PThreadStateLast
}
PThreadState;


typedef struct ptw32_thread_t_ ptw32_thread_t;

struct ptw32_thread_t_
{
#ifdef _UWIN
  DWORD dummy[5];
#endif
  DWORD thread;
  HANDLE threadH;		/* Win32 thread handle - POSIX thread is invalid if threadH == 0 */
  pthread_t ptHandle;		/* This thread's permanent pthread_t handle */
  ptw32_thread_t * prevReuse;	/* Links threads on reuse stack */
  volatile PThreadState state;
  void *exitStatus;
  void *parms;
  int ptErrno;
  int detachState;
  pthread_mutex_t threadLock;	/* Used for serialised access to public thread state */
  int sched_priority;		/* As set, not as currently is */
  pthread_mutex_t cancelLock;	/* Used for async-cancel safety */
  int cancelState;
  int cancelType;
  HANDLE cancelEvent;
#ifdef __CLEANUP_C
  jmp_buf start_mark;
#endif				/* __CLEANUP_C */
#if HAVE_SIGSET_T
  sigset_t sigmask;
#endif				/* HAVE_SIGSET_T */
  int implicit:1;
  void *keys;
  void *nextAssoc;
};


/* 
 * Special value to mark attribute objects as valid.
 */
#define PTW32_ATTR_VALID ((unsigned long) 0xC4C0FFEE)

struct pthread_attr_t_
{
  unsigned long valid;
  void *stackaddr;
  size_t stacksize;
  int detachstate;
  struct sched_param param;
  int inheritsched;
  int contentionscope;
#if HAVE_SIGSET_T
  sigset_t sigmask;
#endif				/* HAVE_SIGSET_T */
};


/*
 * ====================
 * ====================
 * Semaphores, Mutexes and Condition Variables
 * ====================
 * ====================
 */

struct sem_t_
{
  int value;
  pthread_mutex_t lock;
  HANDLE sem;
#ifdef NEED_SEM
  int leftToUnblock;
#endif
};

#define PTW32_OBJECT_AUTO_INIT ((void *) -1)
#define PTW32_OBJECT_INVALID   NULL

struct pthread_mutex_t_
{
  LONG lock_idx;		/* Provides exclusive access to mutex state
				   via the Interlocked* mechanism.
				    0: unlocked/free.
				    1: locked - no other waiters.
				   -1: locked - with possible other waiters.
				*/
  int recursive_count;		/* Number of unlocks a thread needs to perform
				   before the lock is released (recursive
				   mutexes only). */
  int kind;			/* Mutex type. */
  pthread_t ownerThread;
  HANDLE event;			/* Mutex release notification to waiting
				   threads. */
};

struct pthread_mutexattr_t_
{
  int pshared;
  int kind;
};

/*
 * Possible values, other than PTW32_OBJECT_INVALID,
 * for the "interlock" element in a spinlock.
 *
 * In this implementation, when a spinlock is initialised,
 * the number of cpus available to the process is checked.
 * If there is only one cpu then "interlock" is set equal to
 * PTW32_SPIN_USE_MUTEX and u.mutex is a initialised mutex.
 * If the number of cpus is greater than 1 then "interlock"
 * is set equal to PTW32_SPIN_UNLOCKED and the number is
 * stored in u.cpus. This arrangement allows the spinlock
 * routines to attempt an InterlockedCompareExchange on "interlock"
 * immediately and, if that fails, to try the inferior mutex.
 *
 * "u.cpus" isn't used for anything yet, but could be used at
 * some point to optimise spinlock behaviour.
 */
#define PTW32_SPIN_UNLOCKED    (1)
#define PTW32_SPIN_LOCKED      (2)
#define PTW32_SPIN_USE_MUTEX   (3)

struct pthread_spinlock_t_
{
  long interlock;		/* Locking element for multi-cpus. */
  union
  {
    int cpus;			/* No. of cpus if multi cpus, or   */
    pthread_mutex_t mutex;	/* mutex if single cpu.            */
  } u;
};

struct pthread_barrier_t_
{
  unsigned int nCurrentBarrierHeight;
  unsigned int nInitialBarrierHeight;
  int iStep;
  int pshared;
  sem_t semBarrierBreeched[2];
};

struct pthread_barrierattr_t_
{
  int pshared;
};

struct pthread_key_t_
{
  DWORD key;
  void (*destructor) (void *);
  pthread_mutex_t keyLock;
  void *threads;
};


typedef struct ThreadParms ThreadParms;
typedef struct ThreadKeyAssoc ThreadKeyAssoc;

struct ThreadParms
{
  pthread_t tid;
  void *(*start) (void *);
  void *arg;
};


struct pthread_cond_t_
{
  long nWaitersBlocked;		/* Number of threads blocked            */
  long nWaitersGone;		/* Number of threads timed out          */
  long nWaitersToUnblock;	/* Number of threads to unblock         */
  sem_t semBlockQueue;		/* Queue up threads waiting for the     */
  /*   condition to become signalled      */
  sem_t semBlockLock;		/* Semaphore that guards access to      */
  /* | waiters blocked count/block queue  */
  /* +-> Mandatory Sync.LEVEL-1           */
  pthread_mutex_t mtxUnblockLock;	/* Mutex that guards access to          */
  /* | waiters (to)unblock(ed) counts     */
  /* +-> Optional* Sync.LEVEL-2           */
  pthread_cond_t next;		/* Doubly linked list                   */
  pthread_cond_t prev;
};


struct pthread_condattr_t_
{
  int pshared;
};

#define PTW32_RWLOCK_MAGIC 0xfacade2

struct pthread_rwlock_t_
{
  pthread_mutex_t mtxExclusiveAccess;
  pthread_mutex_t mtxSharedAccessCompleted;
  pthread_cond_t cndSharedAccessCompleted;
  int nSharedAccessCount;
  int nExclusiveAccessCount;
  int nCompletedSharedAccessCount;
  int nMagic;
};

struct pthread_rwlockattr_t_
{
  int pshared;
};

/*
 * MCS lock queue node - see ptw32_MCS_lock.c
 */
struct ptw32_mcs_node_t_
{
  struct ptw32_mcs_node_t_ **lock;        /* ptr to tail of queue */
  struct ptw32_mcs_node_t_  *next;        /* ptr to successor in queue */
  LONG                       readyFlag;   /* set after lock is released by
                                             predecessor */
  LONG                       nextFlag;    /* set after 'next' ptr is set by
                                             successor */
};

typedef struct ptw32_mcs_node_t_   ptw32_mcs_local_node_t;
typedef struct ptw32_mcs_node_t_  *ptw32_mcs_lock_t;


struct ThreadKeyAssoc
{
  /*
   * Purpose:
   *      This structure creates an association between a thread and a key.
   *      It is used to implement the implicit invocation of a user defined
   *      destroy routine for thread specific data registered by a user upon
   *      exiting a thread.
   *
   *      Graphically, the arrangement is as follows, where:
   *
   *         K - Key with destructor
   *            (head of chain is key->threads)
   *         T - Thread that has called pthread_setspecific(Kn)
   *            (head of chain is thread->keys)
   *         A - Association. Each association is a node at the

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日日夜夜免费精品视频| 精品一区二区三区视频在线观看| 亚洲妇熟xx妇色黄| 国产一区二区女| 欧美日韩精品综合在线| 中文字幕av免费专区久久| 午夜日韩在线观看| 色婷婷国产精品| 国产日韩精品一区| 精品一区二区三区在线观看国产| 日本高清不卡视频| 亚洲欧洲av另类| 成人激情小说乱人伦| 亚洲精品一区二区三区影院 | 日韩欧美一区在线| 久久美女高清视频| 日韩视频一区二区三区| 国产欧美一区二区精品性色| 五月婷婷激情综合网| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 99久久精品免费看国产免费软件| 日韩一二三四区| 偷偷要91色婷婷| 欧美天天综合网| 一个色在线综合| 在线观看91视频| 一区二区激情小说| 欧美午夜电影网| 亚洲丶国产丶欧美一区二区三区| 色美美综合视频| 亚洲卡通欧美制服中文| 色噜噜狠狠色综合中国| 亚洲精品少妇30p| 日本久久一区二区| 亚洲一区二区三区精品在线| 欧美日精品一区视频| 午夜精品久久久| 欧美一级二级三级乱码| 久久99国产精品久久99| 精品国产乱子伦一区| 韩国视频一区二区| 蜜臀久久99精品久久久画质超高清| 久久日韩精品一区二区五区| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 国产精品系列在线观看| 国产丝袜美腿一区二区三区| 国产成人免费视频网站| 欧美极品少妇xxxxⅹ高跟鞋 | 亚洲国产精品成人久久综合一区| 国产传媒一区在线| 最新国产精品久久精品| 色婷婷av一区二区三区软件 | 久久精品国产一区二区| xnxx国产精品| 不卡的av网站| 午夜精品久久久久久久久久久 | 久久欧美一区二区| 国产成人福利片| 亚洲免费三区一区二区| 欧美精品 日韩| 国产精品一品视频| 一区二区三区在线观看视频| 6080午夜不卡| 成人国产精品免费观看视频| 亚洲香蕉伊在人在线观| 精品国产露脸精彩对白 | 久久久国产精品麻豆| av在线不卡观看免费观看| 亚洲二区在线观看| 久久久精品一品道一区| 欧美三级欧美一级| 国产黄色91视频| 婷婷久久综合九色综合绿巨人| 337p日本欧洲亚洲大胆色噜噜| 91国偷自产一区二区开放时间 | 欧美日韩成人综合| 国产精品一区一区三区| 亚洲高清免费观看高清完整版在线观看| 日韩一区二区精品| 91麻豆国产福利精品| 激情欧美一区二区三区在线观看| 亚洲免费看黄网站| 国产人成一区二区三区影院| 91精品国模一区二区三区| a级高清视频欧美日韩| 精品一区二区三区香蕉蜜桃| 亚洲午夜免费电影| 国产精品久久久久影院| 欧美精品一区二区蜜臀亚洲| 欧美三级中文字幕在线观看| 国v精品久久久网| 久久精品国产成人一区二区三区| 亚洲曰韩产成在线| 亚洲人午夜精品天堂一二香蕉| 精品99一区二区三区| 91精品国产综合久久久久久| 93久久精品日日躁夜夜躁欧美| 国产一区二区久久| 久国产精品韩国三级视频| 日韩精彩视频在线观看| 亚洲尤物在线视频观看| 亚洲欧美日韩在线| 中文字幕一区二区三中文字幕| 久久久久免费观看| 久久这里只有精品视频网| 日韩免费视频线观看| 制服丝袜亚洲网站| 欧美视频在线播放| 欧美午夜片在线观看| 欧美午夜电影网| 91无套直看片红桃| 不卡av在线免费观看| 成人爽a毛片一区二区免费| 国产精品538一区二区在线| 韩国毛片一区二区三区| 国产在线精品一区二区夜色 | 成人av免费在线观看| 处破女av一区二区| 不卡一区二区在线| 91影院在线免费观看| 色综合久久中文综合久久97 | 91蜜桃视频在线| 成人激情综合网站| 国产尤物一区二区| 国产精品一区二区男女羞羞无遮挡| 久久99精品国产91久久来源| 麻豆国产91在线播放| 九九**精品视频免费播放| 韩国v欧美v日本v亚洲v| 国产成人夜色高潮福利影视| 96av麻豆蜜桃一区二区| 欧洲一区二区三区免费视频| 欧美老肥妇做.爰bbww视频| 成人av网站免费| 天天综合网天天综合色| 性做久久久久久免费观看欧美| 午夜电影一区二区三区| 麻豆成人91精品二区三区| 国产久卡久卡久卡久卡视频精品| 成人av在线播放网址| 欧美性一二三区| 精品久久久久99| 中文字幕在线不卡一区| 亚洲成在人线免费| 激情综合一区二区三区| 99精品欧美一区二区三区小说 | 99久久精品国产导航| 欧美精品在欧美一区二区少妇| 欧美va天堂va视频va在线| 中文字幕在线观看不卡| 视频一区视频二区中文字幕| 国产精品亚洲第一区在线暖暖韩国 | 亚洲精品在线免费观看视频| 国产精品国产馆在线真实露脸| 精品在线亚洲视频| 国产v日产∨综合v精品视频| 一区二区三区日韩在线观看| 免费在线看成人av| 成人一级片网址| 欧美一区二区三区性视频| 中文字幕av资源一区| 日本最新不卡在线| 成人免费毛片片v| 欧美一区二区三区男人的天堂| 国产精品萝li| 久久se精品一区二区| 色哟哟日韩精品| 国产欧美日韩三区| 欧美aaa在线| 欧美影视一区在线| 国产精品婷婷午夜在线观看| 日韩电影免费在线| 欧美专区亚洲专区| 成人免费一区二区三区视频| 国产一区二区三区最好精华液 | 懂色av一区二区三区免费看| 欧美精品国产精品| 亚洲精品欧美专区| 成人午夜大片免费观看| wwwwxxxxx欧美| 日本一不卡视频| 欧美午夜寂寞影院| 久久国产精品免费| 欧美最新大片在线看| 久久嫩草精品久久久久| 天天av天天翘天天综合网| 91网址在线看| 中文字幕亚洲区| 国产91精品露脸国语对白| 欧美精品一区视频| 美女视频黄a大片欧美| 91麻豆精品国产91| 午夜一区二区三区在线观看| 在线免费亚洲电影| 一区二区三区鲁丝不卡| 色屁屁一区二区| 亚洲成人手机在线| 欧美精品久久天天躁| 日本不卡一区二区三区高清视频| 欧美日韩精品免费|