Lines Matching full:11
133 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
135 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K ncalls;
137 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
140 \h'|11n'\*(+K}\*(-K
141 \h'|11n'ncalls = atoi(argv[1]);
142 \h'|11n'\*(+Kwhile\*(-K (ncalls\*-\*- > 0)
162 \fI*\fP\h'|11n't1 = time csw <n>
163 \fI*\fP\h'|11n't2 = time signocsw <n>
164 \fI*\fP\h'|11n'overhead = t1 \*- 2 \fI*\fP t2;
170 \*(+Kint\*(-K\h'|11n'sigsub();
171 \*(+Kint\*(-K\h'|11n'otherpid;
172 \*(+Kint\*(-K\h'|11n'nsigs;
176 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
178 \h'|11n'\*(+Kint\*(-K pid;
180 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
183 \h'|11n'\*(+K}\*(-K
184 \h'|11n'nsigs = atoi(argv[1]);
185 \h'|11n'signal(SIGALRM, sigsub);
186 \h'|11n'otherpid = getpid();
187 \h'|11n'pid = fork();
188 \h'|11n'\*(+Kif\*(-K (pid != 0) \*(+K{\*(-K
191 \h'|11n'\*(+K}\*(-K
192 \h'|11n'\*(+Kfor\*(-K (;;)
202 \h'|11n'signal(SIGALRM, sigsub);
203 \h'|11n'kill(otherpid, SIGALRM);
204 \h'|11n'\*(+Kif\*(-K (\*-\*-nsigs <= 0)
223 \*(+Kint\*(-K\h'|11n'pid;
224 \*(+Kint\*(-K\h'|11n'nsigs;
225 \*(+Kint\*(-K\h'|11n'sigsub();
229 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
231 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i;
233 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
236 \h'|11n'\*(+K}\*(-K
237 \h'|11n'nsigs = atoi(argv[1]);
238 \h'|11n'signal(SIGALRM, sigsub);
239 \h'|11n'pid = getpid();
240 \h'|11n'\*(+Kfor\*(-K (i = 0; i < nsigs; i++)
250 \h'|11n'signal(SIGALRM, sigsub);
270 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
272 \h'|11n'\*(+Kchar\*(-K buf[512];
273 \h'|11n'\*(+Kint\*(-K fd[2], msgsize;
274 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i, iter;
276 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
279 \h'|11n'\*(+K}\*(-K
280 \h'|11n'argc\*-\*-, argv++;
281 \h'|11n'iter = atoi(\fI*\fPargv);
282 \h'|11n'argc\*-\*-, argv++;
283 \h'|11n'msgsize = atoi(\fI*\fPargv);
284 \h'|11n'\*(+Kif\*(-K (msgsize > \*(+Ksizeof\*(-K (buf) || msgsize <= 0) \*(+K{\*(-K
287 \h'|11n'\*(+K}\*(-K
288 \h'|11n'\*(+Kif\*(-K (pipe(fd) < 0) \*(+K{\*(-K
291 \h'|11n'\*(+K}\*(-K
292 \h'|11n'\*(+Kfor\*(-K (i = 0; i < iter; i++) \*(+K{\*(-K
295 \h'|11n'\*(+K}\*(-K
315 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
317 \h'|11n'\*(+Kchar\*(-K buf[512];
318 \h'|11n'\*(+Kint\*(-K fd[2], msgsize;
319 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i, iter;
321 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
324 \h'|11n'\*(+K}\*(-K
325 \h'|11n'argc\*-\*-, argv++;
326 \h'|11n'iter = atoi(\fI*\fPargv);
327 \h'|11n'argc\*-\*-, argv++;
328 \h'|11n'msgsize = atoi(\fI*\fPargv);
329 \h'|11n'\*(+Kif\*(-K (msgsize > \*(+Ksizeof\*(-K (buf) || msgsize <= 0) \*(+K{\*(-K
332 \h'|11n'\*(+K}\*(-K
333 \h'|11n'\*(+Kif\*(-K (pipe(fd) < 0) \*(+K{\*(-K
336 \h'|11n'\*(+K}\*(-K
337 \h'|11n'\*(+Kif\*(-K (fork() == 0)
340 \h'|11n'\*(+Kelse\*(-K
365 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
367 \h'|11n'\*(+Kchar\*(-K buf[512];
368 \h'|11n'\*(+Kint\*(-K fd[2], fd2[2], msgsize;
369 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i, iter;
371 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
374 \h'|11n'\*(+K}\*(-K
375 \h'|11n'argc\*-\*-, argv++;
376 \h'|11n'iter = atoi(\fI*\fPargv);
377 \h'|11n'argc\*-\*-, argv++;
378 \h'|11n'msgsize = atoi(\fI*\fPargv);
379 \h'|11n'\*(+Kif\*(-K (msgsize > \*(+Ksizeof\*(-K (buf) || msgsize <= 0) \*(+K{\*(-K
382 \h'|11n'\*(+K}\*(-K
383 \h'|11n'\*(+Kif\*(-K (pipe(fd) < 0) \*(+K{\*(-K
386 \h'|11n'\*(+K}\*(-K
387 \h'|11n'\*(+Kif\*(-K (pipe(fd2) < 0) \*(+K{\*(-K
390 \h'|11n'\*(+K}\*(-K
391 \h'|11n'\*(+Kif\*(-K (fork() == 0)
396 \h'|11n'\*(+Kelse\*(-K
423 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
425 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K nforks, i;
426 \h'|11n'\*(+Kchar\*(-K \fI*\fPcp;
427 \h'|11n'\*(+Kint\*(-K pid, child, status, brksize;
429 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
432 \h'|11n'\*(+K}\*(-K
433 \h'|11n'nforks = atoi(argv[1]);
434 \h'|11n'\*(+Kif\*(-K (nforks < 0) \*(+K{\*(-K
437 \h'|11n'\*(+K}\*(-K
438 \h'|11n'brksize = atoi(argv[2]);
439 \h'|11n'\*(+Kif\*(-K (brksize < 0) \*(+K{\*(-K
442 \h'|11n'\*(+K}\*(-K
443 \h'|11n'cp = (\*(+Kchar\*(-K \fI*\fP)sbrk(brksize);
444 \h'|11n'\*(+Kif\*(-K ((\*(+Kint\*(-K)cp == \*-1) \*(+K{\*(-K
447 \h'|11n'\*(+K}\*(-K
448 \h'|11n'\*(+Kfor\*(-K (i = 0; i < brksize; i += 1024)
450 \h'|11n'\*(+Kwhile\*(-K (nforks\*-\*- > 0) \*(+K{\*(-K
460 \h'|11n'\*(+K}\*(-K
461 \h'|11n'exit(0);
485 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
487 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K nexecs, i;
488 \h'|11n'\*(+Kchar\*(-K \fI*\fPcp, \fI*\fPsbrk();
489 \h'|11n'\*(+Kint\*(-K pid, child, status, brksize;
491 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
495 \h'|11n'\*(+K}\*(-K
496 \h'|11n'nexecs = atoi(argv[1]);
497 \h'|11n'\*(+Kif\*(-K (nexecs < 0) \*(+K{\*(-K
500 \h'|11n'\*(+K}\*(-K
501 \h'|11n'brksize = atoi(argv[2]);
502 \h'|11n'\*(+Kif\*(-K (brksize < 0) \*(+K{\*(-K
505 \h'|11n'\*(+K}\*(-K
506 \h'|11n'cp = sbrk(brksize);
507 \h'|11n'\*(+Kif\*(-K ((\*(+Kint\*(-K)cp == \*-1) \*(+K{\*(-K
510 \h'|11n'\*(+K}\*(-K
511 \h'|11n'\*(+Kfor\*(-K (i = 0; i < brksize; i += 1024)
513 \h'|11n'\*(+Kwhile\*(-K (nexecs\*-\*- > 0) \*(+K{\*(-K
526 \h'|11n'\*(+K}\*(-K
527 \h'|11n'exit(0);
546 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
549 \h'|11n'exit(0);
570 \*(+Kchar\*(-K\h'|11n'space[1024 \fI*\fP 250] = "force into data segment";
574 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
577 \h'|11n'exit(0);
596 \*(+Kchar\*(-K\h'|11n'\fI*\fPvalloc();
600 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
602 \h'|11n'\*(+Kregister\*(-K i, niter;
603 \h'|11n'\*(+Kregister\*(-K \*(+Kchar\*(-K \fI*\fPpf, \fI*\fPlastpage;
604 \h'|11n'\*(+Kint\*(-K npages = 4096, pagesize, vflag = 0;
605 \h'|11n'\*(+Kchar\*(-K \fI*\fPpages, \fI*\fPname;
607 \h'|11n'name = argv[0];
608 \h'|11n'argc\*-\*-, argv++;
610 \h'|11n'\*(+Kif\*(-K (argc < 1) \*(+K{\*(-K
614 \h'|11n'\*(+K}\*(-K
615 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-p") == 0) \*(+K{\*(-K
626 \h'|11n'\*(+K}\*(-K
627 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-v") == 0) \*(+K{\*(-K
631 \h'|11n'\*(+K}\*(-K
632 \h'|11n'niter = atoi(\fI*\fPargv);
633 \h'|11n'pagesize = getpagesize();
634 \h'|11n'pages = valloc(npages \fI*\fP pagesize);
635 \h'|11n'\*(+Kif\*(-K (pages == (\*(+Kchar\*(-K \fI*\fP)0) \*(+K{\*(-K
639 \h'|11n'\*(+K}\*(-K
640 \h'|11n'lastpage = pages + (npages \fI*\fP pagesize);
641 \h'|11n'\*(+Kif\*(-K (vflag)
643 \h'|11n'\*(+Kfor\*(-K (i = 0; i < niter; i++)
663 \*(+Kchar\*(-K\h'|11n'\fI*\fPvalloc();
664 \*(+Kint\*(-K\h'|11n'rand();
668 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
670 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K npages = 4096, pagesize, pn, i, niter;
671 \h'|11n'\*(+Kint\*(-K vflag = 0, debug = 0;
672 \h'|11n'\*(+Kchar\*(-K \fI*\fPpages, \fI*\fPname;
674 \h'|11n'name = argv[0];
675 \h'|11n'argc\*-\*-, argv++;
677 \h'|11n'\*(+Kif\*(-K (argc < 1) \*(+K{\*(-K
681 \h'|11n'\*(+K}\*(-K
682 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-p") == 0) \*(+K{\*(-K
693 \h'|11n'\*(+K}\*(-K
694 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-v") == 0) \*(+K{\*(-K
698 \h'|11n'\*(+K}\*(-K
699 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-d") == 0) \*(+K{\*(-K
703 \h'|11n'\*(+K}\*(-K
704 \h'|11n'niter = atoi(\fI*\fPargv);
705 \h'|11n'pagesize = getpagesize();
706 \h'|11n'pages = valloc(npages \fI*\fP pagesize);
707 \h'|11n'\*(+Kif\*(-K (pages == (\*(+Kchar\*(-K \fI*\fP)0) \*(+K{\*(-K
711 \h'|11n'\*(+K}\*(-K
712 \h'|11n'\*(+Kif\*(-K (vflag)
714 \h'|11n'\*(+Kfor\*(-K (i = 0; i < niter; i++) \*(+K{\*(-K
719 \h'|11n'\*(+K}\*(-K
741 \*(+Kfloat\*(-K\h'|11n'sqrt(), log(), rnd(), cos(), gauss();
742 \*(+Kchar\*(-K\h'|11n'\fI*\fPvalloc();
743 \*(+Kint\*(-K\h'|11n'rand();
747 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
749 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K pn, i, niter, delta;
750 \h'|11n'\*(+Kregister\*(-K \*(+Kchar\*(-K \fI*\fPpages;
751 \h'|11n'\*(+Kfloat\*(-K sd = 10\&.0;
752 \h'|11n'\*(+Kint\*(-K npages = 4096, pagesize, debug = 0;
753 \h'|11n'\*(+Kchar\*(-K \fI*\fPname;
755 \h'|11n'name = argv[0];
756 \h'|11n'argc\*-\*-, argv++;
758 \h'|11n'\*(+Kif\*(-K (argc < 1) \*(+K{\*(-K
763 \h'|11n'\*(+K}\*(-K
764 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-s") == 0) \*(+K{\*(-K
775 \h'|11n'\*(+K}\*(-K
776 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-p") == 0) \*(+K{\*(-K
787 \h'|11n'\*(+K}\*(-K
788 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-d") == 0) \*(+K{\*(-K
792 \h'|11n'\*(+K}\*(-K
793 \h'|11n'niter = atoi(\fI*\fPargv);
794 \h'|11n'pagesize = getpagesize();
795 \h'|11n'pages = valloc(npages\fI*\fPpagesize);
796 \h'|11n'\*(+Kif\*(-K (pages == (\*(+Kchar\*(-K \fI*\fP)0) \*(+K{\*(-K
800 \h'|11n'\*(+K}\*(-K
801 \h'|11n'pn = 0;
802 \h'|11n'\*(+Kfor\*(-K (i = 0; i < niter; i++) \*(+K{\*(-K
811 \h'|11n'\*(+K}\*(-K
819 \h'|11n'\*(+Kfloat\*(-K sd, mean;
821 \h'|11n'\*(+Kregister\*(-K \*(+Kfloat\*(-K qa, qb;
823 \h'|11n'qa = sqrt(log(rnd()) \fI*\fP \*-2\&.0);
824 \h'|11n'qb = 3\&.14159 \fI*\fP rnd();
825 \h'|11n'\*(+Kreturn\*(-K (qa \fI*\fP cos(qb) \fI*\fP sd + mean);
834 \h'|11n'\*(+Kstatic\*(-K \*(+Kint\*(-K seed = 1;
835 \h'|11n'\*(+Kstatic\*(-K \*(+Kint\*(-K biggest = 0x7fffffff;
837 \h'|11n'\*(+Kreturn\*(-K ((\*(+Kfloat\*(-K)rand(seed) \fI\h'\w' 'u-\w'/'u'/\fP (\*(+Kfloat\*(-K)big…