summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libthr/thread/thr_kern.c69
-rw-r--r--lib/libthr/thread/thr_private.h16
2 files changed, 0 insertions, 85 deletions
diff --git a/lib/libthr/thread/thr_kern.c b/lib/libthr/thread/thr_kern.c
index f99547e..5de6051 100644
--- a/lib/libthr/thread/thr_kern.c
+++ b/lib/libthr/thread/thr_kern.c
@@ -50,8 +50,6 @@
} \
} while (0)
-static sigset_t restore;
-
void
_thread_critical_enter(pthread_t pthread)
{
@@ -117,73 +115,6 @@ _thread_sigunblock()
}
}
-void
-GIANT_LOCK(pthread_t pthread)
-{
- sigset_t set;
- sigset_t sav;
- int error;
-
- /*
- * Block all signals.
- */
- SIGFILLSET(set);
-
- /*
- * We can not use the global 'restore' set until after we have
- * acquired the giant lock.
- */
-#if 0
- error = __sys_sigprocmask(SIG_SETMASK, &set, &sav);
- if (error) {
- _thread_printf(STDERR_FILENO, "GIANT_LOCK: sig err %d\n",
- errno);
- abort();
- }
-#endif
-
- error = umtx_lock(&_giant_mutex, pthread->thr_id);
- if (error) {
- _thread_printf(STDERR_FILENO, "GIANT_LOCK: %d\n", errno);
- abort();
- }
-
- restore = sav;
-}
-
-void
-GIANT_UNLOCK(pthread_t pthread)
-{
- sigset_t set;
- int error;
-
- /*
- * restore is protected by giant. We could restore our signal state
- * incorrectly if someone else set restore between unlocking giant
- * and restoring the signal mask. To avoid this we cache a copy prior
- * to the unlock.
- */
- set = restore;
-
- error = umtx_unlock(&_giant_mutex, pthread->thr_id);
- if (error) {
- _thread_printf(STDERR_FILENO, "GIANT_UNLOCK: %d\n", errno);
- abort();
- }
-
-#if 0
- /*
- * Restore signals.
- */
- error = __sys_sigprocmask(SIG_SETMASK, &set, NULL);
- if (error) {
- _thread_printf(STDERR_FILENO, "GIANT_UNLOCK: sig err %d\n",
- errno);
- abort();
- }
-#endif
-}
-
int
_thread_suspend(pthread_t pthread, struct timespec *abstime)
{
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
index 5ffa48a..8e6575e 100644
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -682,15 +682,6 @@ SCLASS int _clock_res_usec /* Clock resolution in usec. */
;
#endif
-/* Giant lock. */
-SCLASS struct umtx _giant_mutex
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= UMTX_INITIALIZER
-#endif
-;
-
-SCLASS int _giant_count;
-
/* Garbage collector condition variable. */
SCLASS pthread_cond_t _gc_cond
#ifdef GLOBAL_PTHREAD_PRIVATE
@@ -713,13 +704,6 @@ SCLASS volatile int _spinblock_count
#endif
;
-/*
- * And, should we climb the beanstalk,
- * We'll meet his brother, Giant.
- */
-void GIANT_LOCK(pthread_t);
-void GIANT_UNLOCK(pthread_t);
-
/* Undefine the storage class specifier: */
#undef SCLASS
OpenPOWER on IntegriCloud