Age | Commit message (Collapse) | Author |
|
* channelio/Makefile (HURDLIBS): Remove threads.
(OTHERLIBS): Add -lpthread.
* channelio/open.h: Use pthread functions instead of cthreads functions.
* libchannel/broadcast.c: Likewise.
* libchannel/channel.h: Likewise.
* libchannel/hub.c: Likewise.
|
|
* Makefile: Rework libstores Makefile.
* tee.c: New file.
* broadcast.c: New file.
* module.c: New file.
* typed.c: New file.
* kids.c: New file.
* control.c: New file.
* fetch.c: New file with dummy implementation.
* file.c: New file.
* argp.c: New file.
* query.c: New file.
* channel.h: Include `cthreads.h'.
(CHANNEL_NO_FILEIO): New flag.
(CHANNEL_ENFORCED): New flag.
(CHANNEL_GENERIC_FLAGS): Add `CHANNEL_NO_FILEIO' and
`CHANNEL_ENFORCED'.
(struct channel): New field `class_hook'.
(struct channel): Add comments for hooks.
(struct channel_hub): New field `lock'.
(struct channel_hub): Fixed comment for `hook'.
(struct channel_hub): New fields `children' and `num_children'.
(struct channel_hub): New field `name'.
(struct channel_class): New method `flush'.
(struct channel_class): New method `control_demuxer'.
(struct channel_class): Move `clear_hub'.
(struct channel_class): New method `validate_name'.
(struct channel_class): New method `create'.
(channel_write): Drop const qualifier from `buf' parameter of
`write'.
(struct channel_class): Drop const qualifier from `buf' parameter
of `write'.
(channel_alloc_hub): Add `name' parameter.
(channel_tee_class): New class.
(channel_broadcast_class): New class.
(channel_typed_class): New class.
(channel_module_class): New class.
(channel_query_class): New class.
(channel_find_class): New function.
(channel_create_tee_hub): New function.
(channel_create_broadcast_hub): New function.
(channel_create_module_hub): New function.
(channel_create_typed_hub): New function.
(channel_create_file_hub): New function.
(channel_create_query_hub): New function.
(channel_fetch_hub): New function.
(channel_file_class): New class.
(channel_module_find_class): New function.
(channel_set_children): New function.
(channel_children_name): New function.
(channel_set_child_flags): New function.
(channel_clear_child_flags): New function.
(channel_create_hub_children): New function.
(channel_control_demuxer): New function.
(channel_begin_using_channel): New function.
(channel_end_using_channel): New function.
(channel_set_hub_name): New function.
(CHANNEL_STD_CLASS): New macro.
(__start_channel_std_classes): New variable.
(__stop_channel_std_classes): New variable.
(channel_argp): New variable.
(struct channel_argp_params): New struct.
(struct channel_parsed): New opaque struct.
(channel_parsed_free): New function.
(channel_create_parsed_hub): New function.
(channel_parsed_append_args): New function.
(channel_parsed_name): New function.
(channel_flush): New function.
* channel.c (channel_alloc): Zero `user_hook'.
(channel_flush): New function `channel_flush'.
(channel_open): Set CHANNEL_READONLY and/or
CHANNEL_WRITEONLY if respective is set in hub.
(channel_write): Drop const qualifier from
`buf' parameter of `write'.
* hub.c (channel_alloc_hub): Set CHANNEL_READONLY if
CHANNEL_HARD_READONLY is set. Include `string.h'.
(channel_alloc_hub): Add `name' parameter and set `name' field.
(channel_alloc_hub): Initialize `lock'.
(channel_alloc_hub): Initialize `children' and num_children'.
(channel_alloc_hub): Set CHANNEL_WRITEONLY if
CHANNEL_HARD_WRITEONLY is set.
(channel_free_hub): Clear `lock'.
(channel_free_hub): Free `children'.
(channel_free_hub): Free `name'.
(channel_set_hub_name): New function.
* tests/test-1.c (triv_fifo_read): Use `size_t' instead of
`mach_type_number_t'.
(triv_fifo_write): Likewise.
(triv_fifo_write): Drop const qualifier.
|
|
* hub.c (channel_alloc_hub): Initialize `lock'.
(channel_free_hub): Clear `lock'.
* channel.c (channel_alloc): Zero `user_hook'.
* channel.c (channel_flush): New function `channel_flush'.
* channel.h: Include `cthreads.h'.
(struct channel): New field `class_hook'.
(struct channel): Add comments for hooks.
(struct channel_hub): New field `lock'.
(struct channel_hub): Fixed comment for `hook'.
(struct channel_class): New method `flush'.
(CHANNEL_NO_FILEIO): New flag.
(CHANNEL_ENFORCED): New flag.
(CHANNEL_GENERIC_FLAGS): Add `CHANNEL_NO_FILEIO' and
`CHANNEL_ENFORCED'.
(channel_flush): New function `channel_flush'.
|
|
* tests/test-1.c (triv_fifo_open): New function.
(triv_fifo_cleanup): Rename to triv_fifo_close.
(triv_fifo_create): Remove.
(triv_fifo_create_hub) New function.
(triv_fifo_read): Use class_hook instead of hook.
(triv_fifo_write): Likewise.
(main): Create triv_fifo hub.
(main): Open triv_fifo channel.
(main): Close triv_fifo channel.
(triv_fifo_class): Set name.
(triv_fifo_class): Set open and close methods.
* Makefile (SRCS): Add hub.c
* hub.c: New file.
* channel.c (channel_create): Rename to channel_alloc.
(channel_alloc): Remove class parameter.
(channel_alloc): Add hub parameter.
(channel_alloc): Use class_hook instead of hook.
(channel_free): Don't call cleanup method.
(channel_open): New function.
(channel_close): New function.
(channel_set_flags): Get class through hub.
(channel_clear_flags): Likewise.
(channel_read): Likewise.
(channel_write): Likewise.
* channel.h: Merge channel and channel_class page.
: Merge channel function pages into single page.
(struct channel): Remove field class.
(struct channel): New field hub.
(struct channel): Rename hook to class_hook.
(struct channel_hub): New struct.
(struct channel_class): Rename method cleanup to close.
(struct channel_class): Fix close comment.
(struct channel_class): New methods open, close, set_hub_flags,
clear_hub_flags, clear_hub.
(channel_create): Rename to channel_alloc.
(channel_alloc): Remove class parameter.
(channel_alloc): Add hub parameter.
(channel_free): Fix comment.
(channel_open, channel_close): New functions.
(channel_alloc_hub, channel_free_hub): New functions.
(channel_set_hub_flags, channel_clear_hub_flags): Likewise.
|