summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2003-09-26 21:38:59 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2003-09-26 21:38:59 +0000
commitee5171b968d87e2807608c64c8a2692d69299ff4 (patch)
tree8c5b25454afb686ce313316bc700d06e27d27c78 /c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c
parent2003-09-26 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-ee5171b968d87e2807608c64c8a2692d69299ff4.tar.bz2
2003-09-26 Joel Sherrill <joel@OARcorp.com>
* hppa1.1/.cvsignore, hppa1.1/ChangeLog, hppa1.1/Makefile.am, hppa1.1/acinclude.m4, hppa1.1/configure.ac, hppa1.1/simhppa/.cvsignore, hppa1.1/simhppa/ChangeLog, hppa1.1/simhppa/Makefile.am, hppa1.1/simhppa/bsp_specs, hppa1.1/simhppa/configure.ac, hppa1.1/simhppa/times, hppa1.1/simhppa/include/.cvsignore, hppa1.1/simhppa/include/Makefile.am, hppa1.1/simhppa/include/bsp.h, hppa1.1/simhppa/include/ttydrv.h, hppa1.1/simhppa/shmsupp/.cvsignore, hppa1.1/simhppa/shmsupp/Makefile.am, hppa1.1/simhppa/shmsupp/README, hppa1.1/simhppa/shmsupp/addrconv.c, hppa1.1/simhppa/shmsupp/cause_intr.c, hppa1.1/simhppa/shmsupp/getcfg.c, hppa1.1/simhppa/shmsupp/lock.c, hppa1.1/simhppa/shmsupp/mpisr.c, hppa1.1/simhppa/start/.cvsignore, hppa1.1/simhppa/start/Makefile.am, hppa1.1/simhppa/start/start.S, hppa1.1/simhppa/startup/.cvsignore, hppa1.1/simhppa/startup/Makefile.am, hppa1.1/simhppa/startup/bspclean.c, hppa1.1/simhppa/startup/bspstart.c, hppa1.1/simhppa/startup/linkcmds, hppa1.1/simhppa/startup/setvec.c, hppa1.1/simhppa/tools/.cvsignore, hppa1.1/simhppa/tools/ChangeLog, hppa1.1/simhppa/tools/Makefile.am, hppa1.1/simhppa/tools/configure.ac, hppa1.1/simhppa/tools/print_dump.c, hppa1.1/simhppa/tty/.cvsignore, hppa1.1/simhppa/tty/Makefile.am, hppa1.1/simhppa/tty/tty.c, hppa1.1/simhppa/wrapup/.cvsignore, hppa1.1/simhppa/wrapup/Makefile.am: Removed.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c
deleted file mode 100644
index ee2f67f108..0000000000
--- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Shared Memory Lock Routines
- *
- * This shared memory locked queue support routine need to be
- * able to lock the specified locked queue. Interrupts are
- * disabled while the queue is locked to prevent preemption
- * and deadlock when two tasks poll for the same lock.
- * previous level.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <bsp.h>
-#include <shm_driver.h>
-
-/*
- * Shm_Initialize_lock
- *
- * Initialize the lock for the specified locked queue.
- */
-
-void Shm_Initialize_lock(
- Shm_Locked_queue_Control *lq_cb
-)
-{
- lq_cb->lock = LQ_UNLOCKED;
-}
-
-/* Shm_Lock( &lq_cb )
- *
- * This shared memory locked queue support routine locks the
- * specified locked queue. It disables interrupts to prevent
- * a deadlock condition.
- */
-
-void Shm_Lock(
- Shm_Locked_queue_Control *lq_cb
-)
-{
- rtems_unsigned32 isr_level;
- vol_u32 *lockptr = &lq_cb->lock;
- rtems_unsigned32 lock_value;
-
- rtems_interrupt_disable( isr_level );
-
- Shm_isrstat = isr_level;
-
- do {
- HPPA_ASM_LDCWS( 0, 0, lockptr, lock_value );
- } while (lock_value == SHM_LOCK_VALUE);
-}
-
-/*
- * Shm_Unlock
- *
- * Unlock the lock for the specified locked queue.
- */
-
-void Shm_Unlock(
- Shm_Locked_queue_Control *lq_cb
-)
-{
- rtems_unsigned32 isr_level;
-
- lq_cb->lock = SHM_UNLOCK_VALUE;
- isr_level = Shm_isrstat;
- rtems_interrupt_enable( isr_level );
-}