diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-01-06 03:19:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:48 -0500 |
commit | 973bd9937569146de0917f54f05b2942f8257912 (patch) | |
tree | 86dd796de5bf456eca904b350c9515f4795122bb /drivers/s390/net/iucv.c | |
parent | 8d93c700a489eba08514222df414a23852a85d2b (diff) |
[PATCH] s390: atomic primitives
Hugh Dickins <hugh@veritas.com>
Fix the broken atomic_cmpxchg primitive. Add atomic_sub_and_test,
atomic64_sub_return, atomic64_sub_and_test, atomic64_cmpxchg,
atomic64_add_unless and atomic64_inc_not_zero. Replace old style
atomic_compare_and_swap by atomic_cmpxchg. Shorten the whole header by
defining most primitives with the two inline functions atomic_add_return and
atomic_sub_return.
In addition this patch contains the s390 related fixes of Hugh's "mm: fill
arch atomic64 gaps" patch.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/net/iucv.c')
-rw-r--r-- | drivers/s390/net/iucv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c index df7647c3c100..ecb2f8fd7873 100644 --- a/drivers/s390/net/iucv.c +++ b/drivers/s390/net/iucv.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: iucv.c,v 1.45 2005/04/26 22:59:06 braunu Exp $ | 2 | * $Id: iucv.c,v 1.47 2005/11/21 11:35:22 mschwide Exp $ |
3 | * | 3 | * |
4 | * IUCV network driver | 4 | * IUCV network driver |
5 | * | 5 | * |
@@ -29,7 +29,7 @@ | |||
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 30 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
31 | * | 31 | * |
32 | * RELEASE-TAG: IUCV lowlevel driver $Revision: 1.45 $ | 32 | * RELEASE-TAG: IUCV lowlevel driver $Revision: 1.47 $ |
33 | * | 33 | * |
34 | */ | 34 | */ |
35 | 35 | ||
@@ -355,7 +355,7 @@ do { \ | |||
355 | static void | 355 | static void |
356 | iucv_banner(void) | 356 | iucv_banner(void) |
357 | { | 357 | { |
358 | char vbuf[] = "$Revision: 1.45 $"; | 358 | char vbuf[] = "$Revision: 1.47 $"; |
359 | char *version = vbuf; | 359 | char *version = vbuf; |
360 | 360 | ||
361 | if ((version = strchr(version, ':'))) { | 361 | if ((version = strchr(version, ':'))) { |
@@ -477,7 +477,7 @@ grab_param(void) | |||
477 | ptr++; | 477 | ptr++; |
478 | if (ptr >= iucv_param_pool + PARAM_POOL_SIZE) | 478 | if (ptr >= iucv_param_pool + PARAM_POOL_SIZE) |
479 | ptr = iucv_param_pool; | 479 | ptr = iucv_param_pool; |
480 | } while (atomic_compare_and_swap(0, 1, &ptr->in_use)); | 480 | } while (atomic_cmpxchg(&ptr->in_use, 0, 1) != 0); |
481 | hint = ptr - iucv_param_pool; | 481 | hint = ptr - iucv_param_pool; |
482 | 482 | ||
483 | memset(&ptr->param, 0, sizeof(ptr->param)); | 483 | memset(&ptr->param, 0, sizeof(ptr->param)); |