aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/include
diff options
context:
space:
mode:
authorCalvin Rose <calsrose@gmail.com>2024-08-11 17:50:58 -0500
committerCalvin Rose <calsrose@gmail.com>2024-08-11 17:50:58 -0500
commita59b5765b6bc2cfc9d6a7b68baca95768b7c755c (patch)
tree7b53e0476669a4e8f348fe68c2ff9e3dc3ae0688 /src/include
parentUpdate CHANGELOG.md (diff)
Work on the filewatch module.
Currently a wrapper around inotify, should be expanded to work with kqueue, icop, and eventually a implementation with polling and stat.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/janet.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/janet.h b/src/include/janet.h
index cc3fe1cf..41d10c88 100644
--- a/src/include/janet.h
+++ b/src/include/janet.h
@@ -354,6 +354,7 @@ typedef struct {
#ifdef JANET_EV
typedef struct JanetOSMutex JanetOSMutex;
typedef struct JanetOSRWLock JanetOSRWLock;
+typedef struct JanetChannel JanetChannel;
#endif
/***** END SECTION CONFIG *****/
@@ -1443,6 +1444,12 @@ JANET_API void *janet_abstract_threaded(const JanetAbstractType *atype, size_t s
JANET_API int32_t janet_abstract_incref(void *abst);
JANET_API int32_t janet_abstract_decref(void *abst);
+/* Expose channel utilities */
+JanetChannel *janet_getchannel(const Janet *argv, int32_t n);
+JanetChannel *janet_optchannel(const Janet *argv, int32_t argc, int32_t n, JanetChannel *dflt);
+JANET_API int janet_channel_give(JanetChannel *channel, Janet x);
+JANET_API int janet_channel_take(JanetChannel *channel, Janet *out);
+
/* Expose some OS sync primitives */
JANET_API size_t janet_os_mutex_size(void);
JANET_API size_t janet_os_rwlock_size(void);