#include "unify.h"
int Seq_Write(seg_id_type seg, void *buff, int len)
Seq_Write writes len bytes from the buffer
pointed to by buff to the sequential segment referenced by
seg. If several processes write to a sequential segment,
no ordering of writes is guaranteed. That is, processes reading from
seg with Seq_Read(3)
may each see different orderings of the data. All reading processes
are guaranteed to see the data written by a call to
Seq_Write as a single contiguous block.
A sequential segment behaves like a circular buffer. If a process
uses Seq_Write(3) to write
more data than a segment can hold before a reading process can read
the data, old data will be overwritten. The length of the segment is
determined when it is created with
Create_Seg(3).
Get_Limit(3) can be called
to determine if data has been overwritten.
On success Seq_Write returns 0.
Otherwise, a value of -1 is returned.
An error may occur if one of the following conditions is met: