Interface function positioning method, device and network device

A technology of interface function and network equipment, which is applied in the field of communication, can solve the problem of low efficiency of interface function and achieve the effect of improving positioning efficiency
CN110427272BActive Publication Date: 2022-07-01NEW H3C TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Publication Date
2022-07-01

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The present invention provides an interface function positioning method, device and network equipment. The network device runs multiple threads, the first thread in the multiple threads obtains the semaphore used to access the data through the interface function, and accesses the data through the semaphore, and the second thread to access the data needs to wait for the semaphore to be released. , obtain the semaphore and access the data, the network device allocates a corresponding signal stack for each thread, the signal stack is used to store the semaphore acquired by the thread, the method includes: judging whether the top semaphore of the signal stack corresponding to the first thread is not Deadlock; if the semaphore at the top of the stack is deadlocked, find the interface function corresponding to the semaphore at the top of the stack from the correspondence between the locally recorded semaphore and the interface function; determine the interface function corresponding to the semaphore at the top of the stack as the problem interface function. Through the present invention, the problem interface function can be quickly located.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present invention relates to the field of communication technologies, and in particular, to a method, device and network device for locating an interface function. Background technique

[0002] Network devices generally support multithreading. An access violation occurs when multiple threads access the same data at the same time. In order to avoid conflicts, a semaphore mechanism is usually introduced.

[0003] The thread obtains the semaphore through the interface function, and accesses the data through the obtained semaphore. At the same time, only one thread is allowed to acquire the semaphore and access the data, and other threads must wait until the semaphore is released before they can acquire the semaphore and access the data.

[0004] If the thread that acquired the semaphore misses releasing the semaphore, other threads will continue to wait and cannot continue to execute. Or, multiple threads request each other for the semaphore that ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More