SEM_UNDO flag of semop function of semaphores

Source: Internet
Author: User
The SEM_UNDO flag of the semop function of semaphores-general Linux technology-Linux technology and application information. For details, refer to the following section. In the advanced programming of the UNIX environment, we can see the following description:
"If the undo flag is specified, sem_op is also subtracted from the semaphore adjustment value of the process" (see page 425)

Excuse me:
If the undo flag is not specified, isn't the process semaphore not subtracted from sem_op? In this case, it makes no sense to set sem_op, because the semaphores do not increase or decrease, and the concurrency cannot be achieved. The information on the internet is probably that the undo sign is used for the system to maintain the semaphore. Please help me with your answers.
Thank you

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.