Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
fd_poll_write.c File Reference

Implements OP_FD_POLL_WRITE to check if a file descriptor is writable. More...

Go to the source code of this file.

Functions

 free_value (to)
 free_value (fdv)
 push_value (vm, make_int(rc))

Variables

case OP_FD_POLL_WRITE
Value fdv = pop_value(vm)
int rc = -1
void to
 break

Detailed Description

Implements OP_FD_POLL_WRITE to check if a file descriptor is writable.

Behavior:

  • Pops timeout_ms (int) and fd (int); waits up to timeout for writability; pushes 1 if writable, 0 otherwise.
  • On non-UNIX platforms, returns 0 (unsupported).

Errors:

  • If types are wrong, prints an error and returns 0.

Definition in file fd_poll_write.c.

Function Documentation

◆ free_value() [1/2]

free_value(fdv)

◆ free_value() [2/2]

free_value(to)

◆ push_value()

push_value(vm,
make_int(rc) )

Variable Documentation

◆ break

break

Definition at line 59 of file fd_poll_write.c.

◆ fdv

void fdv = pop_value(vm)

Definition at line 25 of file fd_poll_write.c.

◆ OP_FD_POLL_WRITE

case OP_FD_POLL_WRITE

Definition at line 22 of file fd_poll_write.c.

◆ rc

int rc = -1

Definition at line 26 of file fd_poll_write.c.

◆ to

void to

Definition at line 54 of file fd_poll_write.c.