发明名称 Method for managing threads using executing time scheduling technique and electronic device using the same method
摘要 A method for managing threads and an electronic device using the method are provided. In the method, a current time is obtained. A time interval from now to a time for the processor to wake up next time is calculated. The processor is released until reaching the end of the time interval. When the end of the time interval is reached or a first notice signal of the processor is received, a first newest time is obtained to update a current time, and the current time is logged as a basis time. It is respectively checked whether the current time satisfies a plurality of predetermined time conditions of the registered threads against a plurality of registered threads in the threads. When the current time satisfies the predetermined time condition of a first registered thread among the registered threads, the first registered thread is waked up.
申请公布号 US9465655(B2) 申请公布日期 2016.10.11
申请号 US201213686928 申请日期 2012.11.28
申请人 HTC Corporation 发明人 Huang Pei-Hao;Ko Pei-Jun;Tu Yuan-Yao;Wei Chih-Chun;Yang Yu-Hsien
分类号 G06F9/48;G06F9/46 主分类号 G06F9/48
代理机构 Jianq Chyun IP Office 代理人 Jianq Chyun IP Office
主权项 1. A method for managing threads, suitable for an electronic device, the electronic device comprising a processor and a memory, the memory comprising a plurality of threads, the threads comprising at least one registered thread and at least one unregistered thread, the method comprising: obtaining a current time and calculating a time interval between the current time and a time for the processor to wake up next time; releasing the processor until reaching the end of the time interval; when receiving a first notice signal of the processor prior to the end of the time interval, obtaining a first newest time to update the current time, logging the current time as a basis time and respectively checking whether or not the current time satisfies a plurality of predetermined time conditions of the at least one registered thread, wherein the first notice signal indicates the processor is resumed from a power-saving mode to execute the at least one unregistered thread; and when the current time satisfies the predetermined time condition of a first registered thread among the registered threads, waking up the first registered thread.
地址 Taoyuan TW