stoneage8.5/石器时代服务器端最新完整源代码/Serv/saac/include/lock.h
anson1788 a5b185b7ef Revert "re upload"
This reverts commit 274b7d169c.
2020-06-23 15:23:51 +08:00

37 lines
932 B
C

#ifndef _LOCK_H_
#define _LOCK_H_
#include "version.h"
typedef struct tagLockNode {
int use;
char cdkey[16];
#ifdef _LOCK_ADD_NAME
char name[32];
#endif
char server[128];
int process;
struct tagLockNode *next,*prev;
} LockNode;
extern LockNode **userlock;
void Lock_Init(void);
#ifdef _LOCK_ADD_NAME
int InsertMemLock(int entry, char *cdkey, char *name, char *passwd, char *server, int process, char *deadline);
#else
int InsertMemLock(int entry, char *cdkey, char *passwd, char *server, int process, char *deadline);
#endif
int DeleteMemLock(int entry, char *cdkey, int *process);
void DeleteMemLockServer(char *sname);
int isMemLocked(int entry, char *cdkey);
int GetMemLockState(int entry, char *cdkey, char *result);
int GetMemLockServer(int entry, char *cdkey, char *result);
int LockNode_getGname( int entries, char *id, char *gname);
int ChangeMemDeadline(int entry, char *cdkey, char *deadline);
#endif