acltdtAttachQueue

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Confirms that the current process has the specified permission on a queue when queue information needs to be shared between processes.

Prototype

aclError acltdtAttachQueue(uint32_t qid, int32_t timeout, uint32_t *permission)

Parameters

Parameter

Input/Output

Description

qid

Input

Queue ID.

timeout

Input

Wait timeout interval. The options are as follows:
  • -1: blocking mode. The system waits until data is successfully added to the queue.
  • 0: non-blocking mode. Data is returned immediately.
  • > 0: configures specific timeout interval, in ms. An error is returned after the timeout interval has reached.

    The timeout interval varies with the operating system. The deviation is generally within a time slice of an operating system. For example, if the time slice of an operating system is 4 ms and the value of wait timeout interval is set to 1 ms, the actual timeout interval ranges from 1 ms to 5 ms. When the CPU load is high, the timeout interval may fluctuate.

permission

Output

Permission flag.

  • The last bit of the output parameter value is used to determine whether the process has the management permission. 0 indicates no; 1 indicates yes.
  • The second least significant bit of the output parameter value is used to determine whether the process has the dequeue permission. 0 indicates no; 1 indicates yes.
  • The third least significant bit of the output parameter value is used to determine whether the process has the enqueue permission. 0 indicates no; 1 indicates yes.

Returns

0 on success; else, failure. For details, see aclError.