Commit Graph

21 Commits

Author SHA1 Message Date
R. Tyler Croy 1d94bae327
Add the Epoll interface 2019-01-06 11:15:14 -08:00
R. Tyler Croy 655a6fa4e7
New scaffolding for async-ada 2019-01-06 09:05:19 -08:00
R. Tyler Croy 2cd3882001
Nuke the old tree entirely.
This was so long ago (almost 8 years!) that I cannot honestly remember where I
was going from a design standpoint.

I'm smarter now, so it should go better this time around
2019-01-06 08:59:17 -08:00
R. Tyler Croy 0ab4fef37e Convert the Async.Epoll package to a generic package so I can easily deal with the Context_Type for callbacks 2011-02-19 12:36:30 -08:00
R. Tyler Croy 29d112af8d Add more tracing to the runloop, fix a Constraint_Error when overstepping the number of events 2011-02-18 21:15:27 -08:00
R. Tyler Croy 09345b97d5 Move our internal Callback_Registry away from a Vectors.Vector to a Hashed_Maps.Map
My previous assumptions about using a Vector as a sparse array turned
out to be incorrect. Whoopsies.
2011-02-18 19:04:14 -08:00
R. Tyler Croy 87945ca59c Add some simple tracing to help figure out the Constraint_Error in the echoserver 2011-02-17 23:04:57 -08:00
R. Tyler Croy 59716b5ba8 Convert the Callback_Tuple to hold a Socket_Type to be passed back into the callback
You can apparently use To_C (Sock) to get a C.int file descriptor, but
you can't turn that back into a Socket_Type. Rats.
2011-02-17 23:03:40 -08:00
R. Tyler Croy 59a8f0433a Rename the package to Async.Epoll 2011-02-15 20:49:22 -08:00
R. Tyler Croy 40f3256188 Implement calling our callbacks. There's no chance this actually works. 2011-02-14 22:10:54 -08:00
R. Tyler Croy 62a7ecf6d8 Add the Callback_Tuple record for carrying the necessary information to execute a callback 2011-02-14 21:21:32 -08:00
R. Tyler Croy 79973ae9a3 Minor tweak to package inclusion style, I likes commas 2011-02-13 16:28:23 -08:00
R. Tyler Croy 606c2fe20b More progress on the Run loop, as in, we're not looping
Need to figure out a way to structure the callbacks such that
consumers can determine whether or not they need to read data, or "accept"
a socket and register the new socket with the hub.

Oof
2011-02-13 12:12:00 -08:00
R. Tyler Croy cb33969847 Add simple Debug_Trace code for printing statements while debugging 2011-02-13 12:11:22 -08:00
R. Tyler Croy d4a9b19359 Store Descriptors as `Natural` data types, since Interface.C.int will raise a Constraint_Error
I believe it's a valid assumption to say all file descriptors should be positive, non-zero integers
2011-02-12 13:29:43 -08:00
R. Tyler Croy 21dda16b30 Tinkering around with the runloop, programming is hard. 2011-02-12 12:21:53 -08:00
R. Tyler Croy 966cb4feab Implement Register, which will handle adding descriptors and callbacks to the hub 2011-02-12 12:20:25 -08:00
R. Tyler Croy 62614d9424 Bring more constants over from <sys/epoll.h> 2011-02-06 09:45:54 -08:00
R. Tyler Croy 8e52a88eb6 Start fleshing out the actual Epoll package interface 2011-02-05 13:01:10 -08:00
R. Tyler Croy 96417981f6 Start to flesh out some bindings to epoll(7) 2011-02-03 18:18:26 -08:00
R. Tyler Croy f03eeabd72 Add empty package spec 2011-02-02 09:38:14 -08:00