| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: lock_stubs.S,v 1.14 2009/04/30 07:01:27 skrll Exp $ */ | | 1 | /* $NetBSD: lock_stubs.S,v 1.15 2011/01/20 19:49:22 skrll Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Andrew Doran and Nick Hudson. | | 8 | * by Andrew Doran and Nick Hudson. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -33,27 +33,27 @@ | | | @@ -33,27 +33,27 @@ |
33 | #include "opt_lockdebug.h" | | 33 | #include "opt_lockdebug.h" |
34 | #include "opt_cputype.h" | | 34 | #include "opt_cputype.h" |
35 | #include "opt_ddb.h" | | 35 | #include "opt_ddb.h" |
36 | | | 36 | |
37 | #define __MUTEX_PRIVATE | | 37 | #define __MUTEX_PRIVATE |
38 | | | 38 | |
39 | #include <machine/asm.h> | | 39 | #include <machine/asm.h> |
40 | #include <machine/mutex.h> | | 40 | #include <machine/mutex.h> |
41 | #include <machine/reg.h> | | 41 | #include <machine/reg.h> |
42 | | | 42 | |
43 | #include "assym.h" | | 43 | #include "assym.h" |
44 | | | 44 | |
45 | /* | | 45 | /* |
46 | * uintptr_t _lock_cas(volatile uintptr_t *val, uintptr_t old, uintptr_t new); | | 46 | * uintptr_t _lock_cas(volatile uintptr_t *ptr, uintptr_t old, uintptr_t new); |
47 | * | | 47 | * |
48 | * Perform an atomic compare-and-swap operation. | | 48 | * Perform an atomic compare-and-swap operation. |
49 | * | | 49 | * |
50 | * On single CPU systems, this can use a restartable sequence: | | 50 | * On single CPU systems, this can use a restartable sequence: |
51 | * there we don't need the overhead of interlocking. | | 51 | * there we don't need the overhead of interlocking. |
52 | */ | | 52 | */ |
53 | | | 53 | |
54 | #ifndef MULTIPROCESSOR | | 54 | #ifndef MULTIPROCESSOR |
55 | | | 55 | |
56 | .global _lock_cas_ras_start | | 56 | .global _lock_cas_ras_start |
57 | .global _lock_cas_ras_end | | 57 | .global _lock_cas_ras_end |
58 | | | 58 | |
59 | .global mutex_enter_crit_start | | 59 | .global mutex_enter_crit_start |