📄 memsem.hh
字号:
/********************************************************************* Description: memsem.hh* Provides function prototypes that let programmers use a block of* memory to implement a mutual exclusion semaphore.** Derived from a work by Fred Proctor & Will Shackleford** Author:* License: LGPL Version 2* System: Linux* * Copyright (c) 2004 All rights reserved.** Last change: * $Revision: 1.6 $* $Author: paul_c $* $Date: 2005/05/23 16:34:10 $********************************************************************/#ifndef MEMSEM_HH#define MEMSEM_HH#include "sem.hh"/* Take the mutual exclusion semaphore. */struct mem_access_object { void *data; long connection_number; long total_connections; double timeout; double sem_delay; int read_only; int split_buffer; char toggle_bit; RCS_SEMAPHORE *sem;};extern int mem_get_access(struct mem_access_object *mo);/* Give up the mutual exclusion semaphore. */extern int mem_release_access(struct mem_access_object *mo);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -