Changeset 22392
- Timestamp:
- 09/30/07 21:41:46 (14 months ago)
- Location:
- haiku/trunk/src/add-ons/kernel/drivers/tty
- Files:
-
- 2 modified
-
tty.cpp (modified) (6 diffs)
-
tty_private.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
haiku/trunk/src/add-ons/kernel/drivers/tty/tty.cpp
r22379 r22392 784 784 tty->lock = NULL; 785 785 tty->settings = &gTTYSettings[index]; 786 tty->select_pool = NULL; 786 787 tty->is_master = isMaster; 787 788 tty->pending_eof = 0; … … 917 918 cookie->other_tty = otherTTY; 918 919 cookie->open_mode = openMode; 919 cookie->select_pool = NULL;920 920 cookie->thread_count = 0; 921 921 cookie->closed = false; … … 1052 1052 } 1053 1053 1054 // notify all pending selects and clean up the pool1055 if (cookie->select_pool) {1056 notify_select_event_pool(cookie->select_pool, B_SELECT_READ);1057 notify_select_event_pool(cookie->select_pool, B_SELECT_WRITE);1058 notify_select_event_pool(cookie->select_pool, B_SELECT_ERROR);1059 1060 delete_select_sync_pool(cookie->select_pool);1061 cookie->select_pool = NULL;1062 }1063 1064 1054 // notify a select write event on the other tty, if we've closed this tty 1065 1055 if (cookie->tty->open_count == 0 && cookie->other_tty->open_count > 0) … … 1073 1063 TRACE(("tty_notify_select_event(%p, %u)\n", tty, event)); 1074 1064 1075 for (TTYCookieList::Iterator it = tty->cookies.GetIterator(); 1076 it.HasNext();) { 1077 tty_cookie *cookie = it.Next(); 1078 1079 if (cookie->select_pool) 1080 notify_select_event_pool(cookie->select_pool, event); 1081 } 1065 if (tty->select_pool) 1066 notify_select_event_pool(tty->select_pool, event); 1082 1067 } 1083 1068 … … 1706 1691 1707 1692 // add the event to the TTY's pool 1708 status_t error = add_select_sync_pool_entry(& cookie->select_pool, sync, ref,1693 status_t error = add_select_sync_pool_entry(&tty->select_pool, sync, ref, 1709 1694 event); 1710 1695 if (error != B_OK) { … … 1785 1770 MutexLocker ttyLocker(tty->lock); 1786 1771 1787 return remove_select_sync_pool_entry(& cookie->select_pool, sync, event);1788 } 1789 1772 return remove_select_sync_pool_entry(&tty->select_pool, sync, event); 1773 } 1774 -
haiku/trunk/src/add-ons/kernel/drivers/tty/tty_private.h
r22357 r22392 111 111 struct tty *other_tty; 112 112 uint32 open_mode; 113 select_sync_pool *select_pool;114 113 int32 thread_count; 115 114 sem_id blocking_semaphore; … … 131 130 struct mutex* lock; 132 131 tty_settings* settings; 132 select_sync_pool* select_pool; 133 133 RequestQueue reader_queue; 134 134 RequestQueue writer_queue;
