summaryrefslogtreecommitdiff
path: root/src/pulp.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2018-09-23 19:34:01 -0700
committerVito Caputo <vcaputo@pengaru.com>2018-09-23 19:34:01 -0700
commit1fb94cc5ec1c0e3ef694b3204afa1500f65dc2f0 (patch)
treebd8aef1f3693bf3cb6d569730999e2bef606b38f /src/pulp.c
parent6d8418dbd0269f2db372902c2d1da7dc1873302b (diff)
libpulp: drop pulp_t from pulp_fiber_get_mailslot()
This function doesn't need to know the pulp instance, and it's awkward in scenarios involving multiple pulp instances. The mailbox api is entirely compatible with passing messages between fibers across disparate pulp instances. In such scenarios, it's unobvious which pulp instance you'd supply to this function - the sender or the recipient's? Well, neither! This way you just supply the destination/recipient's fiber, and it returns the mailslot if the fiber accepts mail.
Diffstat (limited to 'src/pulp.c')
-rw-r--r--src/pulp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pulp.c b/src/pulp.c
index 7f69a4a..e472fb9 100644
--- a/src/pulp.c
+++ b/src/pulp.c
@@ -620,9 +620,8 @@ pulp_usec_t pulp_now(pulp_t *pulp)
* mailbox count will be advanced wether you do anything with the mailslot or
* not. It's up to you to define the contract for your fibers to agree on.
*/
-int pulp_fiber_get_mailslot(pulp_t *pulp, pulp_fiber_t *fiber, void ***res_mailslot)
+int pulp_fiber_get_mailslot(pulp_fiber_t *fiber, void ***res_mailslot)
{
- assert(pulp);
assert(fiber);
assert(res_mailslot);
© All Rights Reserved