diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-04-10 13:45:10 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-04-10 13:45:10 +0000 |
commit | 56551a9bfbb369e29b12d1b60dc810cd5a3356b9 (patch) | |
tree | bb1236158cf45f47b3dbe897aefb0854f8eff5f2 /winsup/cygwin/select.cc | |
parent | 56a188d1f3c3fb3d38c380f0052c16c5ee046c9b (diff) | |
download | cygnal-56551a9bfbb369e29b12d1b60dc810cd5a3356b9.tar.gz cygnal-56551a9bfbb369e29b12d1b60dc810cd5a3356b9.tar.bz2 cygnal-56551a9bfbb369e29b12d1b60dc810cd5a3356b9.zip |
* Use new unified status_flag accessor methods from classes fhandler_*,
tty_min, mtinfo and fs_info thoroughout.
* fhandler.h: Redefine all set_close_on_exec methods to take a bool
argument.
(enum conn_state): Rename from connect_state.
(class fhandler_base): Rename some status flags to align with
accessor method names. Drop encoded flag entirely. Unify status
accessor methods. Const'ify all read accessor methods.
(class fhandler_socket): Ditto.
(class fhandler_dev_raw): Ditto.
* fhandler_disk_file.cc (fhandler_base::fstat_fs): Use fs.fs_is_fat()
instead of evaluating FATness of file system here.
(fhandler_disk_file::opendir): Drop call to set_encoded().
(fhandler_disk_file::readdir): Use pc.isencoded() directly.
* mtinfo.h (class mtinfo_drive): Const'ify all read accessor methods.
* path.cc (fsinfo_cnt): Add.
(fs_info::update): Accomodate class changes. Evaluate file system
name specific flags right here. Add thread safety for reading and
writing global fsinfo array.
* path.h (enum path_types): Drop values for flags kept in fs already.
(struct fs_info): Move status informatin into private struct type
status_flags. Add accessor methods. Remove path and file system
name string arrays in favor of status bits.
(class path_conv): Use new fs_info status information where
appropriate.
(path_conf::fs_has_ea): Rename from fs_fast_ea.
(path_conf::fs_has_acls): New method.
(path_conf::root_dir): Remove.
(path_conf::volname): Remove.
* syscalls (statfs): Evaluate root dir locally.
* tty.h (class tty_min): Unify status accessor methods. Const'ify
all read accessor methods.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r-- | winsup/cygwin/select.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 35ae6522c..eba122e66 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -335,7 +335,7 @@ set_bits (select_record *me, fd_set *readfds, fd_set *writefds, { UNIX_FD_SET (me->fd, writefds); if (me->except_on_write && me->fh->is_socket ()) - ((fhandler_socket *) me->fh)->set_connect_state (connected); + ((fhandler_socket *) me->fh)->connect_state (connected); ready++; } if ((me->except_selected || me->except_on_write) && me->except_ready) @@ -344,7 +344,7 @@ set_bits (select_record *me, fd_set *readfds, fd_set *writefds, { UNIX_FD_SET (me->fd, writefds); if (me->fh->is_socket ()) - ((fhandler_socket *) me->fh)->set_connect_state (connected); + ((fhandler_socket *) me->fh)->connect_state (connected); } if (me->except_selected) UNIX_FD_SET (me->fd, exceptfds); @@ -1400,9 +1400,9 @@ fhandler_socket::select_write (select_record *s) s->cleanup = socket_cleanup; } s->peek = peek_socket; - s->write_ready = saw_shutdown_write () || is_unconnected (); + s->write_ready = saw_shutdown_write () || connect_state () == unconnected; s->write_selected = true; - if (is_connect_pending ()) + if (connect_state () == connect_pending) { s->except_ready = saw_shutdown_write () || saw_shutdown_read (); s->except_on_write = true; |