locker.c
来自「一个类似windows」· C语言 代码 · 共 41 行
C
41 行
#include <headers.h>
#include <datatypes.h>
#include <options.h>
#include <leases.h>
#include <lock.h>
int check_leased_list()
{
DHCPLIST *temp, *ntemp;
int count = 1, i;
/* fprintf( stdout, "checking list! \n" ); */
return 0;
}
static int test_and_set()
{
/* Test lock, if it's locked return FALSE */
return TRUE;
}
int lock_list()
{
int count = 1;
while( !test_and_set() )
{
sleep( 1 );
count++;
}
return count;
}
int unlock_list()
{
return TRUE;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?