head     1.6;
branch   ;
access   ;
symbols  Version_2:1.6 C_Demo_1:1.4;
locks    ; strict;
comment  @ * @;


1.6
date     89.11.09.08.56.04;  author cimarron;  state Version_2;
branches ;
next     1.5;

1.5
date     89.09.18.15.36.45;  author dillon;  state Exp;
branches ;
next     1.4;

1.4
date     89.09.05.17.20.57;  author mao;  state C_Demo_1;
branches ;
next     1.3;

1.3
date     89.09.01.10.44.03;  author dillon;  state Exp;
branches ;
next     1.2;

1.2
date     89.08.31.20.14.19;  author dillon;  state Exp;
branches ;
next     1.1;

1.1
date     89.08.03.02.18.19;  author dillon;  state Exp;
branches ;
next     ;


desc
@68K shared memory locking routines
@


1.6
log
@added $Header$
@
text
@
/*
 *  Spin lock interface routines
 */

#include "port_taslock.h"
RcsId("$Header$");
    
s_lock(lock)
slock_t *lock;
{
    while (tas(lock) != L_SUCCESS);
}

s_unlock(lock)
slock_t *lock;
{
    *lock = 0;
}

s_init_lock(lock)
slock_t *lock;
{
    s_unlock(lock);
}

s_clock(lock)
slock_t *lock;
{
    return(tas(lock));
}

static
foo()
{
asm("LLA0:");
asm("	.data");
asm("	.text");
asm("|#PROC# 04");
asm("	.globl	_tas");
asm("_tas:");
asm("|#PROLOGUE# 1");
asm("	movel   sp@@(0x4),a0");
asm("	tas	a0@@");
asm("	beq	LLA1");
asm("	moveq   #-128,d0");
asm("	rts");
asm("LLA1:");
asm("	moveq   #0,d0");
asm("	rts");
asm("	.data");
}

@


1.5
log
@fixed a fixed bug. -r1.2 got clobbered
@
text
@d7 2
a8 1

@


1.4
log
@Working version of C-only demo
@
text
@d45 1
a45 1
asm("	moveq   #1,d0");
@


1.3
log
@oops fixed. move.l -> movel
@
text
@d45 1
a45 1
asm("	movel   #-128,d0");
@


1.2
log
@tas() returned the wrong code!
@
text
@d45 1
a45 1
asm("	move.l  #-128,d0");
@


1.1
log
@Initial revision
@
text
@d45 1
a45 1
asm("	moveq   #1,d0");
@
