diff options
author | Roland McGrath <roland@gnu.org> | 2001-04-05 06:39:21 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2001-04-05 06:39:21 +0000 |
commit | b42bd0d675ec7d1e1fbbf274fadbea984c8dab22 (patch) | |
tree | a7f61083f2dfa365d5d9e7101c72e8cb5b3b16a9 /kern/lock_mon.c | |
parent | 2d43f4abdedd003eb070d633bac0e3a6fb3a746b (diff) |
2001-04-04 Roland McGrath <roland@frob.com>
* ddb/db_access.h: Fix obsolescent #else/#endif syntax.
* ddb/db_aout.c: Likewise.
* ddb/db_break.c: Likewise.
* ddb/db_break.h: Likewise.
* ddb/db_command.c: Likewise.
* ddb/db_command.h: Likewise.
* ddb/db_cond.c: Likewise.
* ddb/db_examine.c: Likewise.
* ddb/db_expr.c: Likewise.
* ddb/db_ext_symtab.c: Likewise.
* ddb/db_input.c: Likewise.
* ddb/db_lex.c: Likewise.
* ddb/db_macro.c: Likewise.
* ddb/db_mp.c: Likewise.
* ddb/db_output.c: Likewise.
* ddb/db_print.c: Likewise.
* ddb/db_run.c: Likewise.
* ddb/db_sym.c: Likewise.
* ddb/db_task_thread.c: Likewise.
* ddb/db_task_thread.h: Likewise.
* ddb/db_trap.c: Likewise.
* ddb/db_variables.c: Likewise.
* ddb/db_watch.c: Likewise.
* ddb/db_watch.h: Likewise.
* ddb/db_write_cmd.c: Likewise.
* device/dev_pager.c: Likewise.
* device/device_port.h: Likewise.
* device/device_types_kernel.h: Likewise.
* device/ds_routines.h: Likewise.
* device/errno.h: Likewise.
* device/if_ether.h: Likewise.
* device/if_hdr.h: Likewise.
* device/io_req.h: Likewise.
* device/net_io.c: Likewise.
* device/net_io.h: Likewise.
* i386/i386/ast_check.c: Likewise.
* i386/i386/cswitch.S: Likewise.
* i386/i386/db_disasm.c: Likewise.
* i386/i386/db_interface.c: Likewise.
* i386/i386/db_trace.c: Likewise.
* i386/i386/debug.h: Likewise.
* i386/i386/debug_i386.c: Likewise.
* i386/i386/debug_trace.S: Likewise.
* i386/i386/eflags.h: Likewise.
* i386/i386/gdt.h: Likewise.
* i386/i386/hardclock.c: Likewise.
* i386/i386/idt-gen.h: Likewise.
* i386/i386/ipl.h: Likewise.
* i386/i386/ktss.h: Likewise.
* i386/i386/kttd_interface.c: Likewise.
* i386/i386/ldt.h: Likewise.
* i386/i386/lock.h: Likewise.
* i386/i386/locore.S: Likewise.
* i386/i386/mp_desc.h: Likewise.
* i386/i386/pic.c: Likewise.
* i386/i386/pic.h: Likewise.
* i386/i386/pio.h: Likewise.
* i386/i386/pit.h: Likewise.
* i386/i386/seg.h: Likewise.
* i386/i386/thread.h: Likewise.
* i386/i386/trap.c: Likewise.
* i386/i386/trap.h: Likewise.
* i386/i386/vm_param.h: Likewise.
* i386/i386/vm_tuning.h: Likewise.
* i386/i386at/autoconf.c: Likewise.
* i386/i386at/blit.c: Likewise.
* i386/i386at/conf.c: Likewise.
* i386/i386at/fd.c: Likewise.
* i386/i386at/idt.h: Likewise.
* i386/i386at/immc.c: Likewise.
* i386/i386at/kd.c: Likewise.
* i386/i386at/kd_event.c: Likewise.
* i386/i386at/kd_mouse.c: Likewise.
* i386/i386at/model_dep.c: Likewise.
* i386/i386at/rtc.c: Likewise.
* i386/include/mach/i386/asm.h: Likewise.
* i386/include/mach/i386/eflags.h: Likewise.
* i386/include/mach/i386/mach_i386.defs: Likewise.
* i386/include/mach/i386/multiboot.h: Likewise.
* i386/include/mach/i386/trap.h: Likewise.
* i386/include/mach/i386/vm_types.h: Likewise.
* i386/include/mach/sa/stdarg.h: Likewise.
* i386/intel/pmap.c: Likewise.
* i386/intel/pmap.h: Likewise.
* include/alloca.h: Likewise.
* include/device/device_types.defs: Likewise.
* include/device/device_types.h: Likewise.
* include/device/disk_status.h: Likewise.
* include/device/net_status.h: Likewise.
* include/mach/mach.defs: Likewise.
* include/mach/memory_object.defs: Likewise.
* include/mach/std_types.defs: Likewise.
* include/mach_debug/hash_info.h: Likewise.
* include/mach_debug/ipc_info.h: Likewise.
* include/mach_debug/mach_debug.defs: Likewise.
* include/mach_debug/mach_debug_types.defs: Likewise.
* include/mach_debug/mach_debug_types.h: Likewise.
* include/mach_debug/vm_info.h: Likewise.
* include/mach_debug/zone_info.h: Likewise.
* include/sys/ioctl.h: Likewise.
* include/sys/time.h: Likewise.
* ipc/ipc_entry.h: Likewise.
* ipc/ipc_hash.h: Likewise.
* ipc/ipc_init.c: Likewise.
* ipc/ipc_kmsg.c: Likewise.
* ipc/ipc_kmsg.h: Likewise.
* ipc/ipc_marequest.c: Likewise.
* ipc/ipc_marequest.h: Likewise.
* ipc/ipc_mqueue.c: Likewise.
* ipc/ipc_mqueue.h: Likewise.
* ipc/ipc_notify.c: Likewise.
* ipc/ipc_notify.h: Likewise.
* ipc/ipc_object.c: Likewise.
* ipc/ipc_object.h: Likewise.
* ipc/ipc_port.c: Likewise.
* ipc/ipc_port.h: Likewise.
* ipc/ipc_pset.c: Likewise.
* ipc/ipc_pset.h: Likewise.
* ipc/ipc_right.c: Likewise.
* ipc/ipc_right.h: Likewise.
* ipc/ipc_space.c: Likewise.
* ipc/ipc_space.h: Likewise.
* ipc/mach_debug.c: Likewise.
* ipc/mach_msg.c: Likewise.
* ipc/mach_msg.h: Likewise.
* ipc/mach_port.c: Likewise.
* kern/act.c: Likewise.
* kern/assert.h: Likewise.
* kern/ast.c: Likewise.
* kern/ast.h: Likewise.
* kern/bootstrap.c: Likewise.
* kern/counters.c: Likewise.
* kern/counters.h: Likewise.
* kern/debug.h: Likewise.
* kern/exception.c: Likewise.
* kern/host.h: Likewise.
* kern/ipc_host.c: Likewise.
* kern/ipc_host.h: Likewise.
* kern/ipc_kobject.c: Likewise.
* kern/ipc_mig.c: Likewise.
* kern/ipc_tt.c: Likewise.
* kern/ipc_tt.h: Likewise.
* kern/kalloc.h: Likewise.
* kern/lock_mon.c: Likewise.
* kern/mach_clock.c: Likewise.
* kern/mach_factor.c: Likewise.
* kern/mach_param.h: Likewise.
* kern/machine.c: Likewise.
* kern/processor.c: Likewise.
* kern/profile.c: Likewise.
* kern/queue.h: Likewise.
* kern/sched.h: Likewise.
* kern/startup.c: Likewise.
* kern/syscall_emulation.h: Likewise.
* kern/syscall_subr.c: Likewise.
* kern/syscall_subr.h: Likewise.
* kern/syscall_sw.c: Likewise.
* kern/syscall_sw.h: Likewise.
* kern/task.h: Likewise.
* kern/thread_swap.h: Likewise.
* kern/time_out.h: Likewise.
* kern/time_stamp.c: Likewise.
* kern/time_stamp.h: Likewise.
* kern/timer.c: Likewise.
* kern/timer.h: Likewise.
* kern/xpr.c: Likewise.
* kern/xpr.h: Likewise.
* kern/zalloc.c: Likewise.
* kern/zalloc.h: Likewise.
* linux/dev/drivers/block/ide.c: Likewise.
* linux/dev/include/linux/blk.h: Likewise.
* linux/src/include/linux/cdrom.h: Likewise.
* linux/src/include/linux/md.h: Likewise.
* util/cpu.h: Likewise.
* vm/memory_object.c: Likewise.
* vm/memory_object.h: Likewise.
* vm/pmap.h: Likewise.
* vm/vm_debug.c: Likewise.
* vm/vm_external.h: Likewise.
* vm/vm_fault.c: Likewise.
* vm/vm_fault.h: Likewise.
* vm/vm_kern.h: Likewise.
* vm/vm_map.c: Likewise.
* vm/vm_map.h: Likewise.
* vm/vm_object.h: Likewise.
* vm/vm_pageout.c: Likewise.
* vm/vm_pageout.h: Likewise.
* vm/vm_user.h: Likewise.
Diffstat (limited to 'kern/lock_mon.c')
-rw-r--r-- | kern/lock_mon.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/kern/lock_mon.c b/kern/lock_mon.c index ef44329..143d914 100644 --- a/kern/lock_mon.c +++ b/kern/lock_mon.c @@ -1,4 +1,4 @@ -/* +/* * Mach Operating System * Copyright (c) 1990 Carnegie-Mellon University * Copyright (c) 1989 Carnegie-Mellon University @@ -10,7 +10,7 @@ * Grenoble, FRANCE * * All Rights Reserved - * + * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appears in all copies and @@ -19,7 +19,7 @@ * Foundation not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. - * + * * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR @@ -58,10 +58,10 @@ decl_simple_lock_data(extern , printf_lock) #if TIME_STAMP extern time_stamp_t time_stamp; -#else TIME_STAMP +#else /* TIME_STAMP */ typedef unsigned int time_stamp_t; #define time_stamp 0 -#endif TIME_STAMP +#endif /* TIME_STAMP */ #define LOCK_INFO_MAX (1024*32) #define LOCK_INFO_HASH_COUNT 1024 @@ -74,7 +74,7 @@ struct lock_info { unsigned int success; unsigned int fail; unsigned int masked; - unsigned int stack; + unsigned int stack; time_stamp_t time; decl_simple_lock_data(, *lock) vm_offset_t caller; @@ -113,7 +113,7 @@ decl_simple_lock_data(, **lock) li = &default_lock_info; return(li); } - + simple_lock(lock) decl_simple_lock_data(, *lock) @@ -121,7 +121,7 @@ decl_simple_lock_data(, *lock) register struct lock_info *li = locate_lock_info(&lock); register my_cpu = cpu_number(); - if (current_thread()) + if (current_thread()) li->stack = current_thread()->lock_stack++; if (curr_ipl[my_cpu]) li->masked++; @@ -252,8 +252,8 @@ lock_info_sort(arg, abs, count) old_val = max_val; } db_printf("\n%d total locks, %d empty buckets", total, empty ); - if (default_lock_info.success) - db_printf(", default: %d", default_lock_info.success + default_lock_info.fail); + if (default_lock_info.success) + db_printf(", default: %d", default_lock_info.success + default_lock_info.fail); db_printf("\n"); print_lock_info(&mean); } @@ -271,7 +271,7 @@ lock_info_clear() bzero(li, sizeof(struct lock_info)); } } - bzero(&default_lock_info, sizeof(struct lock_info)); + bzero(&default_lock_info, sizeof(struct lock_info)); } print_lock_info(li) @@ -294,7 +294,7 @@ struct lock_info *li; db_printf("\n"); } -#endif NCPUS > 1 && MACH_LOCK_MON +#endif /* NCPUS > 1 && MACH_LOCK_MON */ #if TIME_STAMP @@ -327,9 +327,9 @@ time_lock(loops) } stamp = time_stamp - stamp; db_printf("%d stamps for _simple_locks\n", stamp/loops); -#endif MACH_LOCK_MON +#endif /* MACH_LOCK_MON */ } -#endif TIME_STAMP +#endif /* TIME_STAMP */ #if MACH_MP_DEBUG @@ -369,7 +369,4 @@ retry_bit_lock(index, addr) count = 0; } } -#endif MACH_MP_DEBUG - - - +#endif /* MACH_MP_DEBUG */ |