---
name: "ixp_pending_write"
section: "3"
platform: "linux"
package: "libixp-dev"
version: "0.6~20121202+hg148-5"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/ixp_pending_write"
---

# ixp\_pending\_write(3)

## NAME

ixp\_pending\_write, ixp\_pending\_print, ixp\_pending\_vprint, ixp\_pending\_pushfid, ixp\_pending\_clunk, ixp\_pending\_flush, ixp\_pending\_respond, IxpPending

## SYNOPSIS

```
#include <ixp_srvutil.h>
void ixp_pending_write(IxpPending *pending, const char *dat, long ndat);
int ixp_pending_print(IxpPending *pending, const char *fmt, ...);
int ixp_pending_vprint(IxpPending *pending, const char *fmt, va_list ap);
void ixp_pending_pushfid(IxpPending *pending, IxpFid *fid);
bool ixp_pending_clunk(Ixp9Req *req);
void ixp_pending_flush(Ixp9Req *req);
void ixp_pending_respond(Ixp9Req *req);
typedef struct IxpPending       IxpPending;
struct IxpPending {
        /* Private members */
        ...
}
```

## DESCRIPTION

These functions aid in writing virtual files used for broadcasting events or writing data when it becomes available. When a file to be used with these functions is opened, ixp\_pending\_pushfid should be called with its **[IxpFid(3)](/IxpFid/3.md)** as an argument. This sets the IxpFid's *pending* member to true.  Thereafter, for each file with its *pending* member set, ixp\_pending\_respond should be called for each TRead request, ixp\_pending\_clunk for each TClunk request, and ixp\_pending\_flush for each TFlush request.

ixp\_pending\_write queues the data in *dat* of length *ndat* to be written to each currently pending fid in *pending*. If there is a read request pending for a given fid, the data is written immediately. Otherwise, it is written the next time ixp\_pending\_respond is called. Likewise, if there is data queued when ixp\_pending\_respond is called, it is written immediately, otherwise the request is queued.

ixp\_pending\_print and ixp\_pending\_vprint call ixp\_pending\_write after formatting their arguments with **[ixp\_vsmprint(3)](/ixp_vsmprint/3.md)**.

The IxpPending data structure is opaque and should be initialized zeroed before using these functions for the first time.

## RETURN VALUE

ixp\_pending\_clunk returns true if *pending* has any more pending IxpFids.
