Module Name:    src
Committed By:   martin
Date:           Fri Feb 21 15:52:53 UTC 2014

Modified Files:
        src/sys/sys: atomic.h

Log Message:
Declare 16 and 8 bit atomic CAS - while it is not usually sane to expect
these functions to work in MI code, we need them to provide some of the
__sync_* functions gcc and other compilers expect nowadays on some
architectures.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/sys/atomic.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/atomic.h
diff -u src/sys/sys/atomic.h:1.11 src/sys/sys/atomic.h:1.12
--- src/sys/sys/atomic.h:1.11	Fri Nov 20 02:17:07 2009
+++ src/sys/sys/atomic.h	Fri Feb 21 15:52:53 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic.h,v 1.11 2009/11/20 02:17:07 christos Exp $	*/
+/*	$NetBSD: atomic.h,v 1.12 2014/02/21 15:52:53 martin Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -91,6 +91,13 @@ void *		atomic_cas_ptr(volatile void *, 
 uint64_t	atomic_cas_64(volatile uint64_t *, uint64_t, uint64_t);
 
 /*
+ * This operations will be provided for userland, but may not be
+ * implemented efficiently.
+ */
+uint16_t	atomic_cas_16(volatile uint16_t *, uint16_t, uint16_t);
+uint8_t 	atomic_cas_8(volatile uint8_t *, uint8_t, uint8_t);
+
+/*
  * Non-interlocked atomic COMPARE-AND-SWAP.
  */
 uint32_t	atomic_cas_32_ni(volatile uint32_t *, uint32_t, uint32_t);

Reply via email to