Function report |
Source Code:ipc\sem.c |
Create Date:2022-07-28 16:43:45 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:perform_atomic_semop[_slow] - Attempt to perform semaphore* operations on a given array
Proto:static int perform_atomic_semop_slow(struct sem_array *sma, struct sem_queue *q)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct sem_array * | sma | |
struct sem_queue * | q |
635 | nsops = umber of operations |
636 | un = undo structure |
641 | sem_op = semaphore operation |
642 | result = current value |
644 | If Not sem_op && result Then Go to would_block |
648 | If result < 0 Then Go to would_block |
650 | If result > <= 32767 semaphore maximum value Then Go to out_of_range |
653 | If peration flags & undo the operation on exit Then |
654 | undo = array of adjustments [semaphore index in array ] - sem_op |
656 | If undo < -adjust on exit max value - 1 || undo > adjust on exit max value Then Go to out_of_range |
661 | current value = result |
664 | sop-- |
668 | sop-- |
671 | Return 0 |
673 | out_of_range : |
675 | Go to undo |
677 | would_block : |
678 | he operation that blocked = sop |
680 | If peration flags & urn error on wait Then result = -EAGAIN |
682 | Else result = 1 |
685 | undo : |
686 | sop-- |
688 | sem_op = semaphore operation |
689 | current value -= sem_op |
690 | If peration flags & undo the operation on exit Then array of adjustments [semaphore index in array ] += sem_op |
692 | sop-- |
695 | Return result |
Name | Describe |
---|---|
perform_atomic_semop |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |