prg_mt_global_lock()

Abstract

Locks the global mutex.

Syntax

prg_mt_global_lock (rank_ptr, description, lock_id)
Argument Type Description
rank_ptr int * If the global mutex is set to check for ranks, this will be filled with the lowest ranked mutex for the process if the lock attempt failed. If set to PRGC_NIL, no rank value will be stored.
description char * If the global mutex lock attempt failed, this will be a copy of the description of the lowest ranked mutex locked by the process. The argument should be a char array big enough to store any description. If set to PRGC_NIL, no description will be copied.
lock_id int ID of the locking process (arbitrary value specified by caller)

Return Type

PrgT_Mutex_Result

Success or failure code; one of the values in Table 6 Mutex Package Symbolic Constants.

prg_mt.h

Details

The global mutex is a built-in mutex with the highest possible rank. This mutex can be used by model code when it is undesirable or impossible to create a unique mutex.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com