Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/external/source/vncdll/winvnc/omnithread/nt.h
Views: 11784
// Package : omnithread1// omnithread/nt.h Created : 6/95 tjr2//3// Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.4//5// This file is part of the omnithread library6//7// The omnithread library is free software; you can redistribute it and/or8// modify it under the terms of the GNU Library General Public9// License as published by the Free Software Foundation; either10// version 2 of the License, or (at your option) any later version.11//12// This library is distributed in the hope that it will be useful,13// but WITHOUT ANY WARRANTY; without even the implied warranty of14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU15// Library General Public License for more details.16//17// You should have received a copy of the GNU Library General Public18// License along with this library; if not, write to the Free19// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA20// 02111-1307, USA21//22//23// OMNI thread implementation classes for NT threads.24//2526#ifndef __omnithread_nt_h_27#define __omnithread_nt_h_2829#include <windows.h>3031#define OMNI_THREAD_WRAPPER \32unsigned __stdcall omni_thread_wrapper(LPVOID ptr)3334extern "C" OMNI_THREAD_WRAPPER;3536#define OMNI_MUTEX_IMPLEMENTATION \37CRITICAL_SECTION crit;3839#define OMNI_CONDITION_IMPLEMENTATION \40CRITICAL_SECTION crit; \41omni_thread* waiting_head; \42omni_thread* waiting_tail;4344#define OMNI_SEMAPHORE_IMPLEMENTATION \45HANDLE nt_sem;4647#define OMNI_THREAD_IMPLEMENTATION \48HANDLE handle; \49DWORD nt_id; \50void* return_val; \51HANDLE cond_semaphore; \52omni_thread* cond_next; \53omni_thread* cond_prev; \54BOOL cond_waiting; \55static int nt_priority(priority_t); \56friend class omni_condition; \57friend OMNI_THREAD_WRAPPER;5859#endif606162