.ad 8
.bm 8
.fm 4
.bt $Copyright by   Software AG, 1993$$Page %$
.tm 12
.hm 6
.hs 3
.tt 1 $NME$Project Distributed Database System$vos76a$
.tt 2 $$$
.tt 3 $R.Roedling$ N A M E $1997-04-30$
***********************************************************
.nf


    ========== licence begin LGPL
    Copyright (C) 2002 SAP AG

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    ========== licence end

.fo
.nf
.sp
Module  :
=========
.sp
Purpose :
.CM *-END-* purpose -------------------------------------
.sp
.cp 3
Define  :

.CM *-END-* define --------------------------------------
.sp;.cp 3
Use     :

.CM *-END-* use -----------------------------------------
.sp;.cp 3
Synonym :

.CM *-END-* synonym -------------------------------------
.sp;.cp 3
Author  :
.sp
.cp 3
Created :
.sp
.cp 3
Version :
.sp
.cp 3
Release :  6.2 	 Date : 1997-04-30
.br
.sp
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Specification:

.CM *-END-* specification -------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Description:

.CM *-END-* description ---------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.nf
.oc _/1
Structure:

.CM *-END-* structure -----------------------------------
.sp 2
**********************************************************
.sp
.cp 10
.nf
.oc _/1
.CM -lll-
Code    :

&if  $MACH = ALPHA
.globl  sql76_mem_sync
.ent    sql76_mem_sync

 /*                                        */
 /*  PVOID  sql76_mem_sync ( PVOID Arg );  */
 /*                                        */

sql76_mem_sync:
        ldgp    $gp, 0($27)     /* global ptr gets addr of this function */
       .frame   $sp, 0, $ra, 0
       .prologue       1
        mb                      /* memory barrier     */
        bis     $16, $16, $0    /* arg1 to return reg */
        mb                      /* memory barrier     */
        ret     $zero, ($ra), 1 /* return to caller   */
.end     sql76_mem_sync

&else
;PRETTY
 TITLE   ven76a.asm
 PAGE    ,80
.386P
ifdef _WIN32
.MODEL   SMALL,C
 SYSTEM_LINKAGE=1
else
.MODEL   SMALL,PASCAL
endif

 ASSUME  CS: CODE32

 CODE32 SEGMENT DWORD USE32 PUBLIC 'CODE'

 ;
 ;  BOOL  sql76_interlock ( LONG * plLockAddr );
 ;

ifdef STDCALL
 PUBLIC  sql76_interlock@4

    sql76_interlock@4     PROC NEAR
else
 PUBLIC  sql76_interlock

    sql76_interlock       PROC NEAR
endif

      ifdef SYSTEM_LINKAGE
       mov    eax,esp                    ; EBX = ESP
       mov    eax,[eax + 4]
      endif

       mov    edx,1H                     ; EDX = 1
       lock   xchg   edx,[eax]           ; lock the bus for other processors
                                         ; and exchange DX with lock address
       mov    eax,edx
ifdef STDCALL
       ret    4                          ; return, dispose 4 bytes parameter
else
       ret                               ; return
endif

ifdef STDCALL
     sql76_interlock@4     ENDP
else
     sql76_interlock       ENDP
endif

 ;
 ;  VOID  sql76_clearlock ( LONG * plLockAddr );   // - may be defined as macro
 ;                                                 //   in venk.h

ifdef STDCALL
 PUBLIC  sql76_clearlock@4

    sql76_clearlock@4     PROC NEAR
else
 PUBLIC  sql76_clearlock

    sql76_clearlock       PROC NEAR
endif

      ifdef SYSTEM_LINKAGE
       mov    eax,esp                    ; EBX = ESP
       mov    eax,[eax + 4]
      endif

       mov    DWORD PTR[eax],0H          ; write 0 to the lock address

ifdef STDCALL
       ret    4                          ; return, dispose 4 bytes parameter
else
       ret                               ; return
endif

ifdef STDCALL
     sql76_clearlock@4     ENDP
else
     sql76_clearlock       ENDP
endif
  CODE32 ENDS
  END

&endif

.CM *-END-* code ----------------------------------------
.SP 2
***********************************************************
.PA
