diff --git a/src/backend/port/i386_solaris/Makefile.inc b/src/backend/port/i386_solaris/Makefile.inc
index c88f9a0b4f9897fa4094afdb175c0b4f37a36b05..c9df83ee8b8f961bd70353893bbc3158d9bb44c7 100644
--- a/src/backend/port/i386_solaris/Makefile.inc
+++ b/src/backend/port/i386_solaris/Makefile.inc
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/Makefile.inc,v 1.3 1996/07/25 07:27:08 scrappy Exp $
+#    $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/Makefile.inc,v 1.4 1996/07/25 19:48:24 scrappy Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -15,6 +15,6 @@ CFLAGS+= -DUSE_POSIX_TIME -DNEED_ISINF -DNEED_RUSAGE -DNO_EMPTY_STMTS
 
 LDADD+= -ll -ldl
 
-SUBSRCS+= port.c 
+SUBSRCS+= port.c tas.s
 
 HEADERS+= machine.h port-protos.h rusagestub.h
diff --git a/src/backend/port/i386_solaris/tas.s b/src/backend/port/i386_solaris/tas.s
new file mode 100644
index 0000000000000000000000000000000000000000..bbc91fc82a7d2cbe42f5cf4490006822bca040fe
--- /dev/null
+++ b/src/backend/port/i386_solaris/tas.s
@@ -0,0 +1,35 @@
+/=============================================================================
+/ tas.s -- test and set lock for i386_solaris
+/=============================================================================
+
+        .file   "tas.s"
+        .text
+        .align  16
+.L1.text:
+
+        .globl  tas
+tas:
+        pushl   %ebp            /save prev base pointer
+        movl    %esp,%ebp       /new base pointer
+        pushl   %ebx            /save prev bx
+        movl    8(%ebp),%ebx    /load bx with address of lock
+        pushl   %ebx            /save prev bx
+        movl    8(%ebp),%ebx    /load bx with address of lock
+        movl    $255,%eax       /put something in ax
+        xchgb   %al,(%ebx)      /swap lock value with "0"
+        cmpb    $0,%al          /did we get the lock?
+        jne     .Locked
+        subl    %eax,%eax       /yes, we got it -- return 0
+        jmp     .Finish
+        .align  4
+.Locked:
+        movl    $1,%eax         /no, we didn't get it - return 1
+.Finish:
+        popl    %ebx            /restore prev bx
+        movl    %ebp,%esp       /restore stack state
+        popl    %ebp
+        ret                     /return
+        .align  4
+        .type   tas,@function
+        .size   tas,.-tas
+