From 1296e5e2c706c3ff7858bd2903dcd76c3547d31b Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 30 Nov 2005 08:38:13 +0000 Subject: 2005-11-30 Martin Hunt * transport.h (STP_WORK_TIMER): Declare. * transport.c (_stp_work_queue): Wake up every STP_WORK_QUEUE jiffies and check IO and exit status. (_stp_handle_exit): Deleted. * procfs.c (_stp_proc_write_cmd): Just set exit flag on STP_EXIT. (_stp_write): Don't call wake_up_interruptible. --- runtime/transport/procfs.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'runtime/transport/procfs.c') diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c index 7bba3033..7db6e658 100644 --- a/runtime/transport/procfs.c +++ b/runtime/transport/procfs.c @@ -93,10 +93,7 @@ static ssize_t _stp_proc_write_cmd (struct file *file, const char __user *buf, break; } case STP_EXIT: - /* Cannot call _stp_handle_exit() directly here */ - /* because the buffers may be full and stpd won't be able */ - /* to empty them until this handler returns. */ - schedule_work (&stp_exit); + _stp_exit_flag = 1; break; case STP_TRANSPORT_INFO: { @@ -160,15 +157,11 @@ static int _stp_write (int type, void *data, int len) memcpy (bptr->buf, data, len); bptr->len = len; - /* put it on the pool of ready buffers */ spin_lock(&_stp_ready_lock); list_add_tail(&bptr->list, &_stp_ready_q); spin_unlock(&_stp_ready_lock); - /* now wake up readers */ - wake_up_interruptible(&_stp_proc_wq); - return len; } @@ -236,7 +229,7 @@ static int _stp_set_buffers(int num) int i; struct list_head *p; - printk("stp_set_buffers %d\n", num); + //printk("stp_set_buffers %d\n", num); if (num == 0 || num == _stp_current_buffers) return _stp_current_buffers; -- cgit