summaryrefslogtreecommitdiff
path: root/term/term.h
diff options
context:
space:
mode:
Diffstat (limited to 'term/term.h')
-rw-r--r--term/term.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/term/term.h b/term/term.h
index 2df20337..f154d4c0 100644
--- a/term/term.h
+++ b/term/term.h
@@ -18,7 +18,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-#include <cthreads.h>
+#include <pthread.h>
#include <assert.h>
#include <errno.h>
#include <hurd/trivfs.h>
@@ -95,16 +95,16 @@ long termflags;
#define QUEUE_HIWAT 8100
/* Global lock */
-struct mutex global_lock;
+pthread_mutex_t global_lock;
/* Wakeup when NO_CARRIER turns off */
-struct condition carrier_alert;
+pthread_cond_t carrier_alert;
/* Wakeup for select */
-struct condition select_alert;
+pthread_cond_t select_alert;
/* Wakeup for pty select, if not null */
-struct condition *pty_select_alert;
+pthread_cond_t *pty_select_alert;
/* Bucket for all our ports. */
struct port_bucket *term_bucket;
@@ -188,7 +188,7 @@ struct queue
int hiwat;
short *cs, *ce;
int arraylen;
- struct condition *wait;
+ pthread_cond_t *wait;
quoted_char array[0];
};
@@ -227,10 +227,10 @@ clear_queue (struct queue *q)
{
q->susp = 0;
q->cs = q->ce = q->array;
- condition_broadcast (q->wait);
- condition_broadcast (&select_alert);
+ pthread_cond_broadcast (q->wait);
+ pthread_cond_broadcast (&select_alert);
if (q == inputq && pty_select_alert != NULL)
- condition_broadcast (pty_select_alert);
+ pthread_cond_broadcast (pty_select_alert);
}
#endif /* Use extern inlines. */
@@ -254,10 +254,10 @@ dequeue_quote (struct queue *q)
beep = 1;
if (beep)
{
- condition_broadcast (q->wait);
- condition_broadcast (&select_alert);
+ pthread_cond_broadcast (q->wait);
+ pthread_cond_broadcast (&select_alert);
if (q == inputq && pty_select_alert != NULL)
- condition_broadcast (pty_select_alert);
+ pthread_cond_broadcast (pty_select_alert);
else if (q == outputq)
call_asyncs (O_WRITE);
}
@@ -288,12 +288,12 @@ enqueue_internal (struct queue **qp, quoted_char c)
if (qsize (q) == 1)
{
- condition_broadcast (q->wait);
- condition_broadcast (&select_alert);
+ pthread_cond_broadcast (q->wait);
+ pthread_cond_broadcast (&select_alert);
if (q == inputq)
{
if (pty_select_alert != NULL)
- condition_broadcast (pty_select_alert);
+ pthread_cond_broadcast (pty_select_alert);
call_asyncs (O_READ);
}
}
@@ -349,10 +349,10 @@ queue_erase (struct queue *q)
beep = 1;
if (beep)
{
- condition_broadcast (q->wait);
- condition_broadcast (&select_alert);
+ pthread_cond_broadcast (q->wait);
+ pthread_cond_broadcast (&select_alert);
if (q == inputq && pty_select_alert != NULL)
- condition_broadcast (pty_select_alert);
+ pthread_cond_broadcast (pty_select_alert);
}
return answer;
}