该信号函数在硬件和软件上都可以有效地实现。
This signature function can be efficiently implemented in both hardware and software.
第三章研究信号函数为分段常数非线性函数时模型解的渐近行为。
In the last chapter we study the asymptotic behavior of solutions to the model when the signal function is a nonlinear constant function.
对事件对象调用的等待函数会阻塞调用线程,直到其状态被设置为有信号状态为止。
The wait function on the event object blocks the calling thread until its state is set to signaled state.
该函数首先解锁所有信号并设置会话密钥环。
This function begins by unblocking all signals and setting the session key ring.
这个函数使用一个信号量对象的句柄作为参数,并会一直等待下去,直到其状态变为有信号状态或超时为止。
This function takes the handle to the semaphore object and waits until it is signaled or a timeout occurs.
或者,调用了正在处理全局数据结构的某个函数,而在信号处理器中又调用了同一个函数。
Or, you call some function that was in the middle of the manipulation of the global data structure and you call the same function from the signal handler.
这个函数返回一个信号量集标识符,它与一个参数的键值关联在一起。
This function returns the semaphore set identifier associated with the argument key.
如果调用线程并不拥有这个互斥信号量,那么这个函数的执行将会失败。
If the calling thread has no ownership of this mutex, this function fails.
如果底层的函数处于关键部分,并且生成并处理信号,那么这可能会导致函数不可重入。
If the underlying function is in the middle of a critical section and a signal is generated and handled, this can cause the function to be non-reentrant.
要使用跟踪,可以指定跟踪到信号时执行的命令或函数、要跟踪的信号编号,如此处的清单13中所示。
To use trap, you specify the command or function to be executed when the signal is trapped, and the signal number or Numbers that you want to trap, as shown here in Listing 13.
从上述代码我们可以看到,这就是将logQPushButton的clicked信号连接到新函数的事情。
From there it's just a matter of connecting the log QPushButton's clicked signal to the new function.
每当进程接收到某个已处理的信号时,就会调用通过sigset分配的函数。
Whenever a handled signal is received by a process, the function assigned through sigset is called.
函数调用sigsuspend通过重置信号掩码并使进程休眠一个单一的原子操作来解决这一问题。
The function call sigsuspend resolves this problem by resetting the signal mask and putting the process to sleep in a single atomic operation.
Scilab包括了很多数学函数,因此非常适合进行信号处理。
Scilab includes many math functions and is very good for signal processing.
函数SetEvent()用来将事件对象的状态设置为有信号状态。
The function SetEvent() is used to set the state of the event object to signaled state.
在手工重置事件(manual reset event)中,对象的状态会一直维持为有信号状态,直到使用ResetEvent函数显式地重新设置它为止。
In the manual reset event, the state of the object remains signaled until explicitly reset using the ResetEvent function.
对于SIGCHLD信号,应用程序必须调用wait (3c)函数,以等待子进程退出。
For the SIGCHLD signal, the application must call the wait (3c) function to wait for the child process to exit.
在上面的代码段中,我们将主窗口对象的“destroy ”信号连接到gtk_main _ quit函数。
In the above code snippet, we connect the "destroy" signal of our main window object to the gtk_main_quit function.
类似地,第二行把cb _ button_click函数连接到button对象的clicked信号。
Similarly, the second line connects the cb_button_click function to the clicked signal on the button object.
第一个trap命令将使stopsleep函数在接受到SIGCHLD、SIGINT或SIGTERM信号时运行。
The first trap command causes the stopsleep function to be run whenever a SIGCHLD, SIGINT, or SIGTERM signal is received.
第一行把cb_delete函数连接到window对象的delete - event信号。
The first line connects the cb_delete function to the delete-event signal on the window object.
mysig_handler是在接收到信号时要调用的处理函数。
mysig_handler is the handler function that will be invoked at the time of signal delivery.
stopsleep函数将作为信号结果运行。
在完成这项工作之后,使用queue . task_done函数向任务已经完成的队列发送一个信号。
After the work is done, send a signal to the queue with queue.task_done that the task has been completed.
这实际上会转入到一个stub函数,该函数可以停止SPE处理器、发信号给PPE,而由PPE实际执行函数调用。
This actually goes to a stub function which stops the SPE processor, signals the PPE, and the PPE actually performs the function call.
在Windows中,事件对象是那些需要使用SetEvent函数显式地将其状态设置为有信号状态的同步对象。
In Windows, event objects are one of the synchronization objects whose state needs to be explicitly set to signaled using the SetEvent function. Event objects come in two types.
等待函数中的超时:当在一个等待函数中使用时,可以为Windows信号量对象指定超时值。
Timeout in wait functions: When used in one of the wait functions, timeout value can be specified for Windows semaphore objects.
由于信号在本质上是异步的,所以难以找出当信号处理函数触发某个不可重入函数时导致的bug。
Due to the asynchronous nature of signals, it is difficult to point out the bug caused when a signal-handling function triggers a non-reentrant function.
由于使用了sigset函数(它向信号处理程序分配一个函数指针),清单8比前一个示例稍微复杂一点,。
Listing 8 is slightly more complex than the previous example because of the sigset function, which assigns a function pointer to a signal handler.
为WINCH信号设置一个陷阱,同时指定get _ window_size函数作为捕获到的信号的触发器。
Set a trap for the WINCH signal as well, and assign the get_window_size function to be the trigger of the trapped signal.
应用推荐