📄 5-1.c
字号:
/* * Copyright (c) 2002, Intel Corporation. All rights reserved. * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com * This file is licensed under the GPL license. For the full content * of this license, see the COPYING file at the top level of this * source tree. * Test that timer_delete() returns -1 and sets errno==EINVAL if * timerid is not a valid timer ID. */#include <time.h>#include "compat.h"#include <errno.h>#include "posixtest.h"#define BOGUSTIMERID (PAGE_OFFSET+99999)#define printf printkvoid init_module(void){ timer_t tid; tid = BOGUSTIMERID; if (timer_delete(tid) == -1) { if (errno==EINVAL) { printf("Test PASSED\n"); return PTS_PASS; } else { printf("errno!=EINVAL when bogus timer ID sent\n"); return PTS_FAIL; } } else { printf("timer_delete() did not return -1 for bogus timer ID\n"); return PTS_FAIL; } printf("This code should never be executed\n"); return PTS_UNRESOLVED;}void cleanup_module(void){}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -