Changeset 40
- Timestamp:
- 06/04/08 16:47:27
(6 months ago)
- Author:
- jtang
- Message:
Clarified how sipc_recv_data() should be used if the IPC is shared memory.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r38 |
r40 |
|
| 29 | 29 | allocates the buffer used to store received data; it is the |
|---|
| 30 | 30 | responsibility of the caller to \fBfree()\fR this data afterwards. |
|---|
| 31 | | Otherwise, the shared memory reader must call \fBsipc_shm_recv_done\fR |
|---|
| 32 | | to unblock the sender, and no freeing should occur. |
|---|
| | 31 | .P |
|---|
| | 32 | Otherwise if the IPC channel is shared memory, the returned |
|---|
| | 33 | .I data |
|---|
| | 34 | pointer points into the shared memory buffer. |
|---|
| | 35 | The reader must call \fBsipc_shm_recv_done\fR() to unblock the sender, |
|---|
| | 36 | and |
|---|
| | 37 | .I data |
|---|
| | 38 | should not be freed. |
|---|
| | 39 | After calling \fBsipc_recv_data\fR(), there must be a call to |
|---|
| | 40 | \fBsipc_shm_recv_done\fR() prior to further invocations of |
|---|
| | 41 | \fBsipc_recv_data\fR(), else undefined behavior results. |
|---|
| | 42 | .P |
|---|
| | 43 | This function blocks if no data is in the IPC channel. |
|---|
| 33 | 44 | .SH "RETURN VALUE" |
|---|
| 34 | 45 | This function returns 0 on success, \-1 on error. |
|---|
Download in other formats:
* Generating other formats may take time.