Board.KolibriOS.org

Official KolibriOS board
It is currently Thu May 23, 2019 12:07 pm

All times are UTC+03:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: nanosleep
PostPosted: Thu Sep 04, 2008 11:51 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
I'd need a kernel function to wait 100 microseconds.
So i want the kernel to do something else for 100uS and then return to my program, is it possible?

any help would be apreciated

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
 Post subject: Re: nanosleep
PostPosted: Fri Sep 05, 2008 12:42 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
Ok, i apparantly have found another way around this problem.
My idea was probably silly anyway :)

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
 Post subject: Re: nanosleep
PostPosted: Sat Apr 07, 2012 4:19 am 
f.68.1 likely to help? But it is not guaranteed.

Better late than never. :wink:


Top
   
 Post subject: Re: nanosleep
PostPosted: Sat Apr 07, 2012 11:08 am 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
IIRC, this question was related to in-driver code. The solution I remember was to read a reg from the PCI device, it always takes a certain amount of time.

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
 Post subject: Re: nanosleep
PostPosted: Sat Apr 07, 2012 11:26 am 
Offline
Kernel Developer
User avatar

Joined: Fri Aug 14, 2009 1:46 am
Posts: 1328
A driver can read available system real-time resources easily.

rdtsc for shortest (sub-microsecond) delays, or
northbridge realtime counters (1-100 microseconds)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited