diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-03-04 22:22:51 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-03-04 22:22:51 -0800 |
commit | e66d53a35c7b59f46e31451da90b306a9beeacc6 (patch) | |
tree | efb5e575815c647888784d34a1c7345aa58e7d02 /mpi | |
parent | a32a39a344b069dadae76a3a2de3887edfe30e72 (diff) | |
download | txr-e66d53a35c7b59f46e31451da90b306a9beeacc6.tar.gz txr-e66d53a35c7b59f46e31451da90b306a9beeacc6.tar.bz2 txr-e66d53a35c7b59f46e31451da90b306a9beeacc6.zip |
Socket operations become proper stream virtuals.
* stream.c (unimpl_get_sock_family, unimpl_get_sock_type,
unimpl_get_sock_peer, unimpl_set_sock_peer): New static
functions.
(fill_stream_ops): Set new function pointers in struct
strm_ops to point to the unimpl_* functions.
(stdio_get_sock_family, stdio_get_sock_type,
stdio_get_sock_peer, stdio_set_sock_peer): New static
functions.
(stdio_sock_ops): New static structure.
(make_sock_stream): Use stdio_sock_ops for socket object.
(sock_family, sock_type, sock_peer, sock_set_peer): These API
functions now just call their corresponding virtuals.
(stream_init): Set up stdio_sock_ops as a copy of stdio_ops,
and then override the socket-specific virtuals from the
unimpl_* stubs to the stdio_get_sock_* and stdio_set_sock_*
functions.
* stream.h (struct strm_ops): New members, get_sock_family,
get_sock_type, get_sock_peer and set_sock_peer.
(strm_ops_init): Set new members to zero.
Diffstat (limited to 'mpi')
0 files changed, 0 insertions, 0 deletions