Commits
- Commit:
0e544c93fceb0fd2f1d6345ce6e16848c7fd864e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: add note
- Commit:
710a6fd81e870bab6a28cdc0ecdc6c09921fbdf1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: fmt
- Commit:
562f76f02be1081713e334d1f6faeef7876a55a7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: check for fd dups
- Commit:
ae2955a0d5099c7bfb7ae69346c89874aafc0f88
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: add signal() to catch signals safely too
Uses the 'self-pipe trick' to catch and process signals outside of the
signal environment. A few XXX remains, but this is good enough to hit
the tree.
- Commit:
a3fc3b943e46fff905e5357d2586e95ffcf1ad3e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: move some functions to ev/global.ha
Move there functions that relies on the global event loop.
- Commit:
1b9c9f8a2ae9a9f2cc9b5bde167edcdaf69f1c73
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: fmt
- Commit:
7a04e249c1fa722589158b4cf17ccabd667525b0
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: add loopbreak to the API
- Commit:
094f9ac02972f82c21854aa3e29bfec506aa381f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: rework the API
Allow to create custom event loops, but still retain the possibility
to just use a global one.
- Commit:
6b358d51354f0e3a70b50b7ae95c59cf39143aa2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: remove unnecessary check
- Commit:
01312690395c48635d8351d1cfd16dfe35495394
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: inline use nullable *opaque instead of ev::any
ev::any was just to save some typing; not sure it's worth it. Can be
easily confused with ev::READ and ev::WRITE.
- Commit:
f2f593e9c4e9a188cfb78deb501cdaae2d1a3134
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: use def instead of const for globals
I actually don't get the difference between def and const. maybe def
is guaranteed to be a compile-time constant (just guessing). Other
"#defines" in the hare stdlib seem to use def tho, so follow here too.
- Commit:
e9feffee9feb21519f324d13b201c31acf79b31d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: use two queues
avoids issues with adding/removing elements from the 'working' queue.
ev::add and ev::del only touch the "wip" queue, while poll only
touches the "working" queue.
This technically has the consequences that if from event A we remove
event B which is pending and not yet processed, we may still fire B
once.
- Commit:
d4bd39d8927c67a76bb2e9d330d4ae51e3d3a6b9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ev: process all the events
This was intended as an optimization: poll returns the number of
elements in the pollfd set which had events. Can be revised in the
future.
- Commit:
2bc5ec6b9ae06cefe3454562c1fffd520ba52bcb
- From:
- Omar Polo <op@omarpolo.com>
- Date:
initial import