expound.c (47eb4d1eb88936d972e042f5583dcbec45d121a9) | expound.c (883492d5a933deb34cd27521e7f2756773cd27af) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 13 unchanged lines hidden (view full) --- 22/* 23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 28/* All Rights Reserved */ 29 | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 13 unchanged lines hidden (view full) --- 22/* 23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 28/* All Rights Reserved */ 29 |
30 | |
31#pragma ident "%Z%%M% %I% %E% SMI" 32 33#define _SYSCALL32 34 35#include <stdio.h> 36#include <stdlib.h> 37#include <unistd.h> 38#include <ctype.h> --- 476 unchanged lines hidden (view full) --- 515 == sizeof (arg)) 516 (void) printf("%s\tnodeid=%d\n", 517 pri->pname, arg); 518 } 519 break; 520 } 521} 522 | 30#pragma ident "%Z%%M% %I% %E% SMI" 31 32#define _SYSCALL32 33 34#include <stdio.h> 35#include <stdlib.h> 36#include <unistd.h> 37#include <ctype.h> --- 476 unchanged lines hidden (view full) --- 514 == sizeof (arg)) 515 (void) printf("%s\tnodeid=%d\n", 516 pri->pname, arg); 517 } 518 break; 519 } 520} 521 |
523#define ALL_LOCK_TYPES \ 524 (USYNC_PROCESS|LOCK_ERRORCHECK|LOCK_RECURSIVE|USYNC_PROCESS_ROBUST|\ 525 LOCK_PRIO_INHERIT|LOCK_PRIO_PROTECT|LOCK_ROBUST_NP) | 522#define ALL_LOCK_TYPES \ 523 (USYNC_PROCESS | LOCK_ERRORCHECK | LOCK_RECURSIVE | \ 524 LOCK_PRIO_INHERIT | LOCK_PRIO_PROTECT | LOCK_ROBUST | \ 525 USYNC_PROCESS_ROBUST) |
526 527/* return cv and mutex types */ 528const char * 529synch_type(private_t *pri, uint_t type) 530{ 531 char *str = pri->code_buf; 532 533 if (type & USYNC_PROCESS) 534 (void) strcpy(str, "USYNC_PROCESS"); 535 else 536 (void) strcpy(str, "USYNC_THREAD"); 537 538 if (type & LOCK_ERRORCHECK) 539 (void) strcat(str, "|LOCK_ERRORCHECK"); 540 if (type & LOCK_RECURSIVE) 541 (void) strcat(str, "|LOCK_RECURSIVE"); | 526 527/* return cv and mutex types */ 528const char * 529synch_type(private_t *pri, uint_t type) 530{ 531 char *str = pri->code_buf; 532 533 if (type & USYNC_PROCESS) 534 (void) strcpy(str, "USYNC_PROCESS"); 535 else 536 (void) strcpy(str, "USYNC_THREAD"); 537 538 if (type & LOCK_ERRORCHECK) 539 (void) strcat(str, "|LOCK_ERRORCHECK"); 540 if (type & LOCK_RECURSIVE) 541 (void) strcat(str, "|LOCK_RECURSIVE"); |
542 if (type & USYNC_PROCESS_ROBUST) 543 (void) strcat(str, "|USYNC_PROCESS_ROBUST"); | |
544 if (type & LOCK_PRIO_INHERIT) 545 (void) strcat(str, "|LOCK_PRIO_INHERIT"); 546 if (type & LOCK_PRIO_PROTECT) 547 (void) strcat(str, "|LOCK_PRIO_PROTECT"); | 542 if (type & LOCK_PRIO_INHERIT) 543 (void) strcat(str, "|LOCK_PRIO_INHERIT"); 544 if (type & LOCK_PRIO_PROTECT) 545 (void) strcat(str, "|LOCK_PRIO_PROTECT"); |
548 if (type & LOCK_ROBUST_NP) 549 (void) strcat(str, "|LOCK_ROBUST_NP"); | 546 if (type & LOCK_ROBUST) 547 (void) strcat(str, "|LOCK_ROBUST"); 548 if (type & USYNC_PROCESS_ROBUST) 549 (void) strcat(str, "|USYNC_PROCESS_ROBUST"); |
550 551 if ((type &= ~ALL_LOCK_TYPES) != 0) 552 (void) sprintf(str + strlen(str), "|0x%.4X", type); 553 554 return ((const char *)str); 555} 556 557void --- 4460 unchanged lines hidden (view full) --- 5018 case SYS_lwp_wait: 5019 if (!err && pri->sys_nargs > 1) 5020 show_int(pri, (long)pri->sys_args[1], "lwpid"); 5021 break; 5022 case SYS_lwp_mutex_wakeup: 5023 case SYS_lwp_mutex_lock: 5024 case SYS_lwp_mutex_unlock: 5025 case SYS_lwp_mutex_trylock: | 550 551 if ((type &= ~ALL_LOCK_TYPES) != 0) 552 (void) sprintf(str + strlen(str), "|0x%.4X", type); 553 554 return ((const char *)str); 555} 556 557void --- 4460 unchanged lines hidden (view full) --- 5018 case SYS_lwp_wait: 5019 if (!err && pri->sys_nargs > 1) 5020 show_int(pri, (long)pri->sys_args[1], "lwpid"); 5021 break; 5022 case SYS_lwp_mutex_wakeup: 5023 case SYS_lwp_mutex_lock: 5024 case SYS_lwp_mutex_unlock: 5025 case SYS_lwp_mutex_trylock: |
5026 case SYS_lwp_mutex_init: | 5026 case SYS_lwp_mutex_register: |
5027 if (pri->sys_nargs > 0) 5028 show_mutex(pri, (long)pri->sys_args[0]); 5029 break; 5030 case SYS_lwp_mutex_timedlock: 5031 if (pri->sys_nargs > 0) 5032 show_mutex(pri, (long)pri->sys_args[0]); 5033 if (pri->sys_nargs > 1) 5034 show_timestruc(pri, (long)pri->sys_args[1], "timeout"); --- 179 unchanged lines hidden --- | 5027 if (pri->sys_nargs > 0) 5028 show_mutex(pri, (long)pri->sys_args[0]); 5029 break; 5030 case SYS_lwp_mutex_timedlock: 5031 if (pri->sys_nargs > 0) 5032 show_mutex(pri, (long)pri->sys_args[0]); 5033 if (pri->sys_nargs > 1) 5034 show_timestruc(pri, (long)pri->sys_args[1], "timeout"); --- 179 unchanged lines hidden --- |