| |

VerySource

 Forgot password?
 Register
Search
View: 696|Reply: 1

interruptible_sleep_on_timeout (&keypad_thread-> queue, HZ / 100);

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 France

Post time: 2020-1-27 17:20:01
| Show all posts |Read mode
If the Frequency of the CPU is 260MHZ,
#define HZ 100
Then interruptible_sleep_on_timeout (&keypad_thread-> queue, HZ / 100);
How much time is waiting? What is the formula?
Reply

Use magic Report

0

Threads

8

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 Unknown

Post time: 2020-3-10 00:30:01
| Show all posts
Section from LDD2
sleep_on_timeout (wait_queue_head_t * queue,
interruptible_sleep_on_timeout (wait_queue_
long timeout);
These two functions behave like the previous two, with
sleep will last no longer than the given timeout period. specified
in "jiffies", which are covered in Chapter 6.


#define HZ 100 represents the clock ticks in 1 second
Your time is 10ms (1 / 100s)
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list