/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* bos72Q src/bos/kernel/sys/cs.h 1.1.1.1                                 */
/*                                                                        */
/* Licensed Materials - Property of IBM                                   */
/*                                                                        */
/* COPYRIGHT International Business Machines Corp. 1985,2019              */
/* All Rights Reserved                                                    */
/*                                                                        */
/* US Government Users Restricted Rights - Use, duplication or            */
/* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.      */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */
/* @(#)38	1.1.1.1  src/bos/kernel/sys/cs.h, sysproc, bos72Q, q2019_13A4 2/6/19 00:41:18 */
/*
 * COMPONENT_NAME: (SYSPROC) Kernel Process Management
 *
 * FUNCTIONS: 
 *	defines and prototype for the "cs" SVC, compare and swap.
 *
 * ORIGINS: 27
 *
 * (C) COPYRIGHT International Business Machines Corp. 1985, 1989
 * All Rights Reserved
 * Licensed Materials - Property of IBM
 *
 * US Government Users Restricted Rights - Use, duplication or
 * disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 */
#ifndef _h_CS
#define _h_CS

#ifdef __cplusplus
extern "C" {
#endif

/* Return values. */
#define CS_SWAPPED 0
#define CS_NOT_SWAPPED  1

/*
 * cs prototype.
 *
 * input:
 *	Pointer to the word to test & set.
 *	compare value
 *	swap value placed into word if compares equal.
 *
 * output:
 *	CS_SWAPPED - returned if swap occurred (equal compare)
 *	CS_NOT_SWAPPED - returned if no swap (not equal)
 */
#ifdef _NO_PROTO
extern int cs();
#else /* _NO_PROTO */
extern int cs(int *,int,int);
#endif

#ifdef __cplusplus
}
#endif

#endif /* !_h_CS */
