Subversion Repositories Kolibri OS

Rev

Rev 6295 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6295 Rev 6936
Line 824... Line 824...
824
 * and call this function with @use_ticket == 1 and @ticket->stamp == the unique
824
 * and call this function with @use_ticket == 1 and @ticket->stamp == the unique
825
 * sequence number. If upon call of this function, the buffer object is already
825
 * sequence number. If upon call of this function, the buffer object is already
826
 * reserved, the validation sequence is checked against the validation
826
 * reserved, the validation sequence is checked against the validation
827
 * sequence of the process currently reserving the buffer,
827
 * sequence of the process currently reserving the buffer,
828
 * and if the current validation sequence is greater than that of the process
828
 * and if the current validation sequence is greater than that of the process
829
 * holding the reservation, the function returns -EAGAIN. Otherwise it sleeps
829
 * holding the reservation, the function returns -EDEADLK. Otherwise it sleeps
830
 * waiting for the buffer to become unreserved, after which it retries
830
 * waiting for the buffer to become unreserved, after which it retries
831
 * reserving.
831
 * reserving.
832
 * The caller should, when receiving an -EAGAIN error
832
 * The caller should, when receiving an -EDEADLK error
833
 * release all its buffer reservations, wait for @bo to become unreserved, and
833
 * release all its buffer reservations, wait for @bo to become unreserved, and
834
 * then rerun the validation with the same validation sequence. This procedure
834
 * then rerun the validation with the same validation sequence. This procedure
835
 * will always guarantee that the process with the lowest validation sequence
835
 * will always guarantee that the process with the lowest validation sequence
836
 * will eventually succeed, preventing both deadlocks and starvation.
836
 * will eventually succeed, preventing both deadlocks and starvation.
837
 *
837
 *