Skip to content

suggestion: int fd --> void *handler #2

@nerilex

Description

@nerilex

While working on an [adaption for (integration of) USB-devices],(https://github.com/nerilex/libmsr/tree/usb-support) into the library, the direct use of file descriptors turned out problematic.

I temporarily solved it for my for by using a msrio abstraction layer which manages a table of functions and handlers into which the former filedescriptors are now just indexes.

A generic void* or some other opaque pointer given to the application would probably ease abstraction and avoid the allocation of tables.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions