---
name: "pvm_setmwid"
section: "3"
platform: "linux"
package: "pvm-dev"
version: "3.4.2-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/pvm_setmwid"
---

# pvm\_setmwid(3)

Get or set wait ID of a message. \[In Version 3.4: Relaced by pvm\_getminfo and pvm\_setminfo\]

## NAME

pvm\_getmwid, pvm\_setmwid - Get or set wait ID of a message.\
 \[In Version 3.4: Relaced by pvm\_getminfo and pvm\_setminfo\]

## SYNOPSIS

```
C	int info = pvm_getmwid( int bufid )
	int info = pvm_setmwid( int bufid, int waitid )
Fortran	Not Available
```

## PARAMETERS

- bufid

  **Message buffer identifier.**

- waitid

  **Wait identifier number.**

## DESCRIPTION

**A wait identifier is part of a message (like the source,** **destination, tag and body).** **It is used to match a reply to the corresponding request.**

**The default wait ID for a message is zero (none).**

**pvm\_getmwid returns the wait ID associated with a message buffer,** **or a negative error code.**

**pvm\_setmwid assigns a new wait ID to a message buffer.** **It returns PvmOk unless an error occurs.**

## EXAMPLES

```
	int src, tag;
	pvm_recv(-1, -1);
	/* ... process, compose reply message */
	pvm_setmwid(pvm_getsbuf(), pvm_getmwid(pvm_getrbuf()));
	pvm_bufinfo(pvm_getrbuf(), (int *)0, &tag, &src);
	pvm_send(src, tag);
```

## ERRORS

**The following error conditions can be returned by** **pvm\_getmwid or pvm\_setmwid:**

- PvmBadParam

  **Invalid value for** *bufid* argument.

- PvmNoSuchBuf

  Message buffer *bufid* doesn't exist.

## SEE ALSO

pvm\_bufinfo(3PVM)
