Skip to content

Commit

Permalink
Updated todo and PKGBUILD after 5.0.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeDP committed Sep 7, 2019
1 parent 33c3a13 commit b7a7c58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 108 deletions.
4 changes: 2 additions & 2 deletions Extra/Arch/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Federico Di Pierro <nierro92@gmail.com>

pkgname=libmodule
pkgver=4.2.0
pkgver=5.0.0
pkgrel=1
pkgdesc="C linux library to build simple and modular projects"
arch=(any)
Expand All @@ -10,7 +10,7 @@ license=(MIT)
depends=()
makedepends=(git cmake)
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=("8bab8e23e324df7ffec6377a966ff71ced2c7de1bc59dfd806748fd9fcf5c51f")
sha256sums=("fa82567c56313b69bea589f7a1a027217b722b9c885c2d645a826d8af307a6c9")

prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
Expand Down
106 changes: 0 additions & 106 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,109 +1,3 @@
## 5.0.0

### PubSub improvements
- [x] avoid strdupping topic when creating pubsub_msg_t
- [x] Only use one pubsub msg for every module, instead of creating one for each recipient
- [x] Keep a reference count for each "sent" pubsub msg: when it reaches 0 it means all recipients received the message, and then in can be freed
- [x] Add an autofree field to module_tell/module_pubsub that automatically frees sent data when last recipient receives it
- [x] Avoid strdupping module's name and ctx's name
- [x] Avoid any allocation inside library and ALWAYS TRUST USER POINTER as core rule
- [x] Add a self() alias to _self
- [x] module_subscribe/unsubscribe should avoid checking if topic is registered in context
- [x] Add new System messages: MODULE_STARTED/STOPPED
- [x] Avoid telling system messages like MODULE_STARTED/TOPIC_REGISTERED to ourselves
- [x] Test pubsub messagging for paused modules
- [x] Fix memleaks!
- [x] Unsubscribe shopuld not check if topic is registered in ctx as otherwise umsubscribing from a deregistered topic would not work.
- [x] pubsub interface should take "const void *" instead of "const unsigned char *" as data
- [x] Add a new parameter "bool global" to module_broadcast?
- [x] FIX: if first context does not receive a global broadcast, message will be destroyed as it has 0 refs...
- [x] Rename pubsub_msg to ps_msg inside msg_t
- [x] Rename pubsub_msg_t to ps_msg_t
- [x] Rename pubsub_priv_t to ps_priv_t
- [x] Add a module_poisonpill() function, to send a system message to a module to stop it -> this will be enqueued in module's message queue,
conversely to module_stop that should stop module right away freeing all its enqueued messages.
- [x] Always destroy messages in flush_pubsub_msg()? RIght now it delivers all of them if we're stopping looping on ctx
- [x] module_poisonpill should only be sent to RUNNING modules
- [x] when stop looping on a context, flush all pubsub messages to RUNNING modules only. Destroy messages for non-running modules.
- [x] Drop (de)register_topic?
- [x] mod->subscriptions map lazy creation
- [x] Support regex topic subscriptions

### Map
- [x] FIx: avoid incrementing map size on value update
- [x] Add test for update
- [x] map->dtor should default to memhook._free, and fallback to default if map_set_dtor is called with NULL callback parameter
- [x] Add map_itr_t interface
- [x] Add tests for new interface
- [x] Improve hashmap implementation
- [x] Add a stress test for hashmap implementation
- [x] Fix map_clear implementation
- [x] Add map_iterate test
- [x] Set keydup and autofree in map_new()
- [x] Drop map_set_dtor
- [x] Destroy old value upon val update
- [x] Avoid destroying map value on update with same pointer; just return MAP_OK

### Stack
- [x] stack->dtor should default to memhook._free, and fallback to default if stack_set_dtor is called with NULL callback parameter
- [X] Add stack_itr_t interface
- [x] Add tests for new interface
- [x] Stack_iterate to follow same logic as map_iterate
- [x] Set autofree in stack_new()
- [x] Drop stack_set_dtor

### Queue
- [x] Add queue API
- [x] Add doc

### Generic
- [x] Add some diagnostic API, eg: module_dump() (to dump each module's state)
- [x] Add a module_load/unload function, to load a module from a compiled object at runtime
- [x] simplify interface for module_load/unload? ie: module_load(path, ctx_name)
- [x] Add test.so build to Easy example
- [x] Re-evaluate module_register/deregister parameters (ie: self_t should not be a const!)
- [x] Provide a default (weak symbol) main() that just runs modules_ctx_loop() on any ctx it found
- [x] Rename MODULE_DEFAULT_CTX and MODULE_MODULE_MAX_EVENTS to MODULES_*
- [x] Actually call init() callback first time module is started, even without passing from evaluate_module (thus without looping ctx)
- [x] module_load/unload should use RTLD_NOLOAD flag instead of yet another hashmap
- [x] module_get_name/ctx to return a strdup string
- [x] Rename modules_set_memalloc_hook to modules_set_memhook() + rename memalloc_hook to memhook_t
- [x] stop() and start() should avoid err_str parameter.
- [x] Stop looping on context when there are no RUNNING modules
- [x] Cleanup some out of date comments in examples
- [x] Avoid exposing in modules.h main() and modules_pre_start() functions: they're not part of libmodule's API and cannot be called as functions.
- [x] Rename module to mod_t and m_context to ctx_t
- [x] Rename module_poll_t to fd_priv_t
- [x] FIX: avoid sending with MODULE_STOPPED pubsub message a not-exishtent reference to mod->self when deregistering, as module gets freed right after. Send NULL.
- [x] FIX: when deregistering, remove module from context before stopping it
- [x] Rename userhook to userhook_t, following other types

### Doc
- [x] module_dump
- [x] module_subscribe/unsubscribe
- [x] self()
- [x] module_register/deregister
- [x] module_load/unload
- [x] module_tell/publish/broadcast
- [x] MODULE_STARTED/MODULE_STOPPED new sysmessages
- [x] Avoid telling system messages like MODULE_STARTED/TOPIC_REGISTERED to ourselves
- [x] Document main() weak symbol!
- [x] Add a new page about trusting pointers
- [x] modules_set_memhook/memhook_t
- [x] new stop behaviour (stop will always destroy pubsub messages instead of delivering them, except when a module gets stopped through module_poisonpill)
- [x] module_poisonpill
- [x] New modules_loop behaviour (stop looping when no RUNNING modules)
- [x] New Map API
- [x] New Stack API
- [x] Dropped (de)register_topic!

### Samples
- [x] Fix samples

### Test
- [x] Fix tests
- [x] add module_dump tests

## 5.1.0

### Submodules
Expand Down

0 comments on commit b7a7c58

Please sign in to comment.