usr/src/common/atomic/amd64/atomic.s
changeset 4292 d7beef35913b
parent 0 68f95e015346
child 6812 febeba71273d
equal deleted inserted replaced
4291:2650d270ece9 4292:d7beef35913b
     1 /*
     1 /*
     2  * CDDL HEADER START
     2  * CDDL HEADER START
     3  *
     3  *
     4  * The contents of this file are subject to the terms of the
     4  * The contents of this file are subject to the terms of the
     5  * Common Development and Distribution License, Version 1.0 only
     5  * Common Development and Distribution License (the "License").
     6  * (the "License").  You may not use this file except in compliance
     6  * You may not use this file except in compliance with the License.
     7  * with the License.
       
     8  *
     7  *
     9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
     8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
    10  * or http://www.opensolaris.org/os/licensing.
     9  * or http://www.opensolaris.org/os/licensing.
    11  * See the License for the specific language governing permissions
    10  * See the License for the specific language governing permissions
    12  * and limitations under the License.
    11  * and limitations under the License.
    18  * information: Portions Copyright [yyyy] [name of copyright owner]
    17  * information: Portions Copyright [yyyy] [name of copyright owner]
    19  *
    18  *
    20  * CDDL HEADER END
    19  * CDDL HEADER END
    21  */
    20  */
    22 /*
    21 /*
    23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
    22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
    24  * Use is subject to license terms.
    23  * Use is subject to license terms.
    25  */
    24  */
    26 
    25 
    27 	.ident	"%Z%%M%	%I%	%E% SMI"
    26 	.ident	"%Z%%M%	%I%	%E% SMI"
    28 
    27 
   580 	ret
   579 	ret
   581 	SET_SIZE(atomic_clear_long_excl)
   580 	SET_SIZE(atomic_clear_long_excl)
   582 
   581 
   583 #if !defined(_KERNEL)
   582 #if !defined(_KERNEL)
   584 
   583 
       
   584 	/*
       
   585 	 * NOTE: membar_enter, and membar_exit are identical routines. 
       
   586 	 * We define them separately, instead of using an ALTENTRY
       
   587 	 * definitions to alias them together, so that DTrace and
       
   588 	 * debuggers will see a unique address for them, allowing 
       
   589 	 * more accurate tracing.
       
   590 	*/
       
   591 
   585 	ENTRY(membar_enter)
   592 	ENTRY(membar_enter)
   586 	ALTENTRY(membar_exit)
       
   587 	mfence
   593 	mfence
   588 	ret
   594 	ret
       
   595 	SET_SIZE(membar_enter)
       
   596 
       
   597 	ENTRY(membar_exit)
       
   598 	mfence
       
   599 	ret
   589 	SET_SIZE(membar_exit)
   600 	SET_SIZE(membar_exit)
   590 	SET_SIZE(membar_enter)
       
   591 
   601 
   592 	ENTRY(membar_producer)
   602 	ENTRY(membar_producer)
   593 	sfence
   603 	sfence
   594 	ret
   604 	ret
   595 	SET_SIZE(membar_producer)
   605 	SET_SIZE(membar_producer)