亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 2timers.c

?? rtlinux-3.2源碼
?? C
字號:
/* * Copyright (C) 1997 by the University of Kansas Center for Research, * Inc.  This software was developed by the Information and * Telecommunication Technology Center (ITTC) at the University of * Kansas.  Partial funding for this project was provided by Sprint. This * software may be used and distributed according to the terms of the GNU * Public License, incorporated herein by reference.  Neither ITTC nor * Sprint accept any liability whatsoever for this product. * * This project was developed under the direction of Dr. Douglas Niehaus. * * Authors: Shyam Pather, Balaji Srinivasan  * * Please send bug-reports/suggestions/comments to posix@ittc.ukans.edu * * Further details about this project can be obtained at *    http://hegel.ittc.ukans.edu/projects/posix/ *//* 2timer_test.c *  * This program demonstrates the use of POSIX.4 interval timers without  * queued signals. It simply creates a POSIX.4 interval timer that sends * a normal signal when it expires. The handler for this signal prints * a message, and increments a count. When the count reaches MAX_EXPIRATIONS, * the timer is deleted, and the program exits.  *//* Modified by J. Vidal to test RTLinux POSIX.4 interval timers 22-09-2002 */ #include <rtl.h>#include <rtl_sched.h>#include <time.h>#include <signal.h>#include "utils.h"#define printf rtl_printf#define TIMER1_SIGNAL RTL_SIGRTMAX#define TIMER2_SIGNAL RTL_SIGRTMIN#define DATA_VAL 17#define MAX_EXPIRATIONS 10#define MAX_SIGNALS 30#define MAXTASKS 10#define NTASKS 1struct params {  clockid_t clock;  int of1,in1,of2,in2;} param ;pthread_t th[MAXTASKS];int expirations;timer_t t1, t2;rtl_sigset_t set;void *thread_code(void *arg);#define sigprocmask pthread_sigmaskstatic void init_param(struct params *p,clockid_t cl,int of1,int in1,int of2,int in2) {       p->clock=cl;       p->of1=of1;       p->in1=in1;       p->of2=of2;       p->in2=in2;}void timer1_handler(int signo){	printf("handler timer1 expired: signal %d\n",signo);	expirations++;}void timer2_handler(int signo){  printf("handler timer2 expired: signal %d\n",signo);}int init_module(void){	sigevent_t sig1, sig2;	int i;	expirations = 0;#if 0        printf("Using CLOCK_REALTIME \n");        init_param(&param,CLOCK_REALTIME,12345678L,20000000L,10000000L,10000000L);        printf("Using CLOCK_MONOTONIC \n");        init_param(&param,CLOCK_MONOTONIC,12345678L,20000000L,10000000L,10000000L);#endif        printf("Using CLOCK_REALTIME\n");        init_param(&param,CLOCK_REALTIME,552345678L,20000L,10000000L,16000L);        		/* 	 * Set up the signal event that will occur when the timer 	 * expires. 	 */		sig1.sigev_notify = SIGEV_SIGNAL;	sig1.sigev_signo = TIMER1_SIGNAL;	sig1.sigev_value.sival_ptr = &t1;		sig2.sigev_notify = SIGEV_SIGNAL;	sig2.sigev_signo = TIMER2_SIGNAL;	sig2.sigev_value.sival_ptr = &t2;			/*	 * Create and set the timer.	 */	timer_create(CLOCK_REALTIME, &sig1, &t1);	timer_create(CLOCK_REALTIME, &sig2, &t2);	for (i=0 ; i < NTASKS ; i++)	  pthread_create(&th[i],NULL,thread_code,(int *) i);	return 0;}void cleanup_module(void){  int i;	/* 	 * Delete the timer.	 */		timer_delete(t1); 	timer_delete(t2);	sigprocmask(SIG_UNBLOCK, &set, NULL);  	for (i=0;i<NTASKS;i++)	  pthread_delete_np(th[i]);}void *thread_code(void *arg){	struct itimerspec new_setting1, new_setting2, remaining;	struct sigaction sa;	int err=0;	/*	 * Initialize the timer setting structure.	 */	new_setting1.it_value.tv_sec = 0L;	new_setting1.it_value.tv_nsec = param.of1;	new_setting1.it_interval.tv_sec = 0L;	new_setting1.it_interval.tv_nsec = param.in1;	timespec_normalize(&new_setting1.it_value);	timespec_normalize(&new_setting1.it_interval);	new_setting2.it_value.tv_sec = 0L;	new_setting2.it_value.tv_nsec = param.of2;	new_setting2.it_interval.tv_sec = 0L;	new_setting2.it_interval.tv_nsec = param.in2;	timespec_normalize(&new_setting2.it_value);	timespec_normalize(&new_setting2.it_interval);	/* 	 * Set up and install a signal handler for the signal that 	 * the timer will send. 	 */	sa.sa_handler = timer1_handler;	sa.sa_flags = 0;	rtl_sigemptyset(&sa.sa_mask);	if ((err=sigaction(TIMER1_SIGNAL, &sa, NULL))<0){	  rtl_printf("Error while sigaction(TIMER1_SIGNAL,..)\n");	  pthread_exit(NULL);	}	sa.sa_handler = timer2_handler;	sa.sa_flags = 0;	rtl_sigemptyset(&sa.sa_mask);	if ((err=sigaction(TIMER2_SIGNAL, &sa, NULL))<0){	  rtl_printf("Error while sigaction(TIMER2_SIGNAL,..)\n");	  pthread_exit(NULL);	}	rtl_sigemptyset(&set);	rtl_sigaddset(&set, TIMER1_SIGNAL);	rtl_sigaddset(&set, TIMER2_SIGNAL);	sigprocmask(SIG_BLOCK, &set, NULL);	timer_settime(t1, 0, &new_setting1, NULL); 	timer_gettime(t1, &remaining);	printf("timer id %d: it_value=%ld.%09ld, it_interval=%ld.%09ld\n",               t1->id,	       remaining.it_value.tv_sec,	       remaining.it_value.tv_nsec,	       remaining.it_interval.tv_sec,	       remaining.it_interval.tv_nsec);	timer_settime(t2, 0, &new_setting2, NULL); 	timer_gettime(t2, &remaining);	printf("timer id %d: it_value=%ld.%09ld, it_interval=%ld.%09ld\n",               t2->id,	       remaining.it_value.tv_sec,	       remaining.it_value.tv_nsec,	       remaining.it_interval.tv_sec,	       remaining.it_interval.tv_nsec);	/* 	 * Busy wait until the timer expires MAX_EXPIRATIONS number 	 * of times.	 */	rtl_sigfillset(&set);	rtl_sigdelset(&set, TIMER1_SIGNAL);	rtl_sigdelset(&set, TIMER2_SIGNAL);	while ((expirations < MAX_EXPIRATIONS)) {	  sigsuspend(&set);	}	rtl_printf(SETCOLOR_SUCCESS"TEST SUCCESSFULLY PASSED !"SETCOLOR_NORMAL);	return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91久久精品一区二区三| 亚洲免费观看高清| 国产精品国产自产拍在线| 五月天网站亚洲| www.66久久| 精品国产网站在线观看| 一个色妞综合视频在线观看| 岛国精品一区二区| 日韩免费看网站| 日韩精品欧美成人高清一区二区| 成人免费高清视频| 久久精品人人做人人综合| 性做久久久久久| 在线观看亚洲一区| 亚洲欧美一区二区三区国产精品| 精品伊人久久久久7777人| 欧美性色欧美a在线播放| 国产精品久久久久久久久免费丝袜 | 日韩欧美国产一区二区三区| 中文字幕在线一区免费| 国产精品12区| 久久亚洲私人国产精品va媚药| 亚洲国产成人tv| 在线免费观看视频一区| 成人欧美一区二区三区在线播放| 国产精品一区在线观看乱码 | 天天色图综合网| 欧美日韩不卡在线| 一区二区三区产品免费精品久久75| 成人国产在线观看| 亚洲国产高清aⅴ视频| 国产成人丝袜美腿| 国产亚洲人成网站| 国产suv精品一区二区三区| 国产日韩av一区| aaa欧美色吧激情视频| 国产精品人成在线观看免费 | 国产精品影视在线| 精品欧美一区二区久久 | 国产亚洲成aⅴ人片在线观看| 久久99久久久欧美国产| 精品国产成人系列| 国产精品一区专区| 国产精品国产三级国产普通话蜜臀| 波多野结衣亚洲| 艳妇臀荡乳欲伦亚洲一区| 欧美色综合天天久久综合精品| 亚洲精品免费在线观看| 欧美麻豆精品久久久久久| 麻豆成人久久精品二区三区小说| 精品国产一区二区三区忘忧草 | 精品一区二区三区视频| 国产日韩欧美制服另类| 99久久伊人网影院| 丝袜美腿亚洲色图| 欧美成人a视频| 从欧美一区二区三区| 亚洲综合另类小说| 欧美电视剧免费观看| 国产a区久久久| 亚洲一区欧美一区| 欧美mv日韩mv国产网站app| 成人av网站在线观看免费| 亚洲成av人片www| 久久精品无码一区二区三区| 色一区在线观看| 久久精品国产亚洲a| 中文字幕五月欧美| 日韩一区二区麻豆国产| 成人毛片视频在线观看| 肉肉av福利一精品导航| 国产亚洲精品7777| 欧美色国产精品| 国产裸体歌舞团一区二区| 亚洲国产成人av好男人在线观看| 26uuu国产一区二区三区| 在线亚洲免费视频| 国产高清不卡一区| 日韩精品欧美精品| 一区二区三区四区亚洲| 久久综合色8888| 欧美日韩精品系列| 91亚洲永久精品| 国产一区999| 日韩电影免费在线看| 亚洲精品网站在线观看| 精品国产sm最大网站免费看| 欧美三级蜜桃2在线观看| 成人免费高清在线| 国产裸体歌舞团一区二区| 日韩精品午夜视频| 亚洲sss视频在线视频| 亚洲特黄一级片| 国产日韩精品视频一区| 日韩欧美国产三级电影视频| 欧美日韩国产大片| 欧洲精品中文字幕| 91小视频在线| 成人激情免费电影网址| 国产一区亚洲一区| 精品一区二区免费看| 日韩高清在线不卡| 日本欧美一区二区三区| 亚洲综合色自拍一区| 国产精品久久久久久久第一福利| 久久久亚洲午夜电影| wwww国产精品欧美| 欧美电视剧在线观看完整版| 欧美第一区第二区| 精品日韩一区二区三区免费视频| 91精品国产综合久久小美女| 欧美色老头old∨ideo| 欧美视频在线观看一区二区| 91搞黄在线观看| 欧美日韩一区二区三区在线| 欧美视频日韩视频| 777久久久精品| 4hu四虎永久在线影院成人| 欧美精品九九99久久| 日韩欧美的一区二区| 欧美zozo另类异族| 欧美韩日一区二区三区四区| 国产精品另类一区| 中文av字幕一区| 亚洲靠逼com| 亚洲成人免费观看| 麻豆国产欧美日韩综合精品二区 | 日本国产一区二区| 欧美日韩一区二区三区四区五区| 欧美日韩国产综合久久 | 综合分类小说区另类春色亚洲小说欧美 | 亚洲特黄一级片| 亚洲国产欧美日韩另类综合 | 不卡av在线网| 在线中文字幕一区二区| 4438成人网| 久久久久久免费网| 伊人一区二区三区| 麻豆91免费观看| 成人综合婷婷国产精品久久| 色综合一个色综合亚洲| 日韩一区二区精品在线观看| 日本一区二区三区在线观看| 亚洲与欧洲av电影| 久草热8精品视频在线观看| 成人毛片视频在线观看| 欧美日本精品一区二区三区| 久久久精品综合| 香蕉av福利精品导航 | 精品一区二区三区免费毛片爱| 国产91高潮流白浆在线麻豆| 色噜噜狠狠成人网p站| 日韩亚洲欧美一区二区三区| 国产精品久久久久桃色tv| 三级不卡在线观看| 不卡av免费在线观看| 日韩亚洲欧美在线| 亚洲女厕所小便bbb| 国产一区二区调教| 91久久久免费一区二区| 国产亚洲精品福利| 香蕉加勒比综合久久| 99在线精品视频| 久久婷婷色综合| 日日噜噜夜夜狠狠视频欧美人 | 亚洲黄色尤物视频| 看片网站欧美日韩| 色偷偷久久一区二区三区| 2021久久国产精品不只是精品| 亚洲另类在线一区| 国产 欧美在线| 日韩一区二区高清| 亚洲一区二区黄色| 色偷偷久久人人79超碰人人澡| 久久久不卡影院| 极品少妇xxxx偷拍精品少妇| 欧美特级限制片免费在线观看| 国产日韩精品久久久| 国产在线精品一区二区不卡了| 欧美视频一区二区在线观看| 亚洲人成网站在线| caoporm超碰国产精品| 精品欧美一区二区久久| 欧美aaa在线| 国产精品一区二区久久精品爱涩| 9191成人精品久久| 亚洲国产精品一区二区久久恐怖片| 91香蕉视频污在线| 亚洲欧美韩国综合色| 成人av网站在线| 国产精品久久久久久亚洲伦| 成人国产精品免费观看视频| 国产日韩欧美a| 国产99久久久久| 国产精品久久久久影视| 成人av网址在线| 亚洲裸体在线观看| 在线观看一区日韩| 亚洲福利电影网| 欧美二区乱c少妇|