You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A well-known classification of coroutines concerns the control-transfer operations that are provided and distinguishes the concepts of symmetric and asymmetric coroutines. Symmetric coroutine facilities provide a single control-transfer operation that allows coroutines to explicitly pass control between themselves. Asymmetric coroutine mechanisms (more commonly denoted as semi-symmetric or semi coroutines) provide two control-transfer operations: one for invoking a coroutine and one for suspending it, the latter returning control to the coroutine invoker. While symmetric coroutines operate at the same hierarchical level, an asymmetric coroutine can be regarded as subordinate to its caller, the relationship between them being somewhat similar to that between a called and a calling routine.
目前 ROS 提供的系统调用有如下四个:
ros_init()
: 初始化系统时钟等ros_create_task(*task, task_func, priority, stack, stack_size)
: 创建任务ros_delay(ticks)
: 挂起任务一段时间,主动让出CPUros_schedule()
: 任务调度,不必主动调用功能十分有限和
简洁简陋,之后会考虑提供更多系统调用,丰富任务间协同通信的能力:ros_yield(x)
: 挂起任务并返回值,唤醒任意其他的任务ros_join(*task)
: 等待其他任务结束chan
The text was updated successfully, but these errors were encountered: