scheme_fd_to_semphore Not Implemented

24 views
Skip to first unread message

Ray Racine

unread,
Sep 22, 2019, 11:42:41 AM9/22/19
to racket...@googlegroups.com
Making the switch to the CS version and ran into one small issue.

My low level Bluetooth socket packet leveraged the Inside Racket C API scheme_fd_to_semaphore function.  Currently I am getting a "Not implemented" message.  A search of Racket docs still finds it, however, it appears to be dropped in the IO runtime changes.

Is there a new equivalent API call I can leverage?


It is a small standalone file.

The following reproduces the issue.

bt-socket-ffi.rkt> (define s (socket AF_BLUETOOTH SOCK_RAW BTPROTO_HCI
bt-socket-ffi.rkt> (scheme_fd_to_semaphore s 1 #t)
; scheme_fd_to_semaphore: implementation not found; arguments: 12 1 #t

Matthew Flatt

unread,
Sep 22, 2019, 11:46:40 AM9/22/19
to Ray Racine, racket...@googlegroups.com
Use `ffi/unsafe/port`.

In general, things that we used to leave to the C API should have
counterparts as `ffi/unsafe/...` libraries. Several are in place,
although I doubt that we've covered everything that will turn out to be
useful.
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAL5pz%3D%2BFGLAUUh-bg0zMo%2BQkM
> %3DqFRPRz05w552sWxDjnQmWxdw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages