GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HMAKE(3) libdill Library Functions HMAKE(3)

hmake - creates a handle

#include <libdillimpl.h>
struct hvfs {
    void *(*query)(struct hvfs *vfs, const void *type);
    void (*close)(int h);
    int (*done)(struct hvfs *vfs, int64_t deadline);
};
int hmake(
    struct hvfs* hvfs);
    

A handle is the user-space equivalent of a file descriptor. Coroutines and channels are represented by handles.

Unlike with file descriptors, however, you can use the hmake function to create your own type of handle.

The argument of the function is a virtual-function table of operations associated with the handle.

When implementing the close operation, keep in mind that invoking blocking operations is not allowed, as blocking operations invoked within the context of a close operation will fail with an ECANCELED error.

To close a handle, use the hclose function.

hvfs: virtual-function table of operations associated with the handle

In case of success the function returns newly created handle. In case of error it returns -1 and sets errno to one of the values below.

ECANCELED: Current coroutine was canceled.
EINVAL: Invalid argument.
ENOMEM: Not enough memory.

hclose(3) hown(3) hquery(3)

libdill

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.