OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Dec 12, 2017 7:49 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: How do you implement bread() in your kernel?
PostPosted: Thu Jun 01, 2017 9:30 am 
Offline

Joined: Mon Sep 19, 2016 5:34 am
Posts: 24
Hi, all...
I have read plenty books about VFS. Comparing designs from Linux and UNIX-likes.
Linux's bread() will end up in disk driver's request() handler. But a book said that in some UNIX-like kernels, it will calls bread() from vnode/inode (struct inode_operations) who represented for specific disk devices.

Actually, I like simpler second method. But in doubt, I want to clarify what I was said from the book.
Is it right that some UNIX-likes using bread() inode/vnode operation? If so, why there are strategy() operation inside it too?

Thanks before..

_________________
https://github.com/irvanherz/jaura/


Top
 Profile  
 
 Post subject: Re: How do you implement bread() in your kernel?
PostPosted: Tue Jun 06, 2017 5:47 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7153
Location: Germany
Code:
loaf * bread()
{
     return malloc( sizeof( loaf ) );
}


Sorry, couldn't resist.

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re: How do you implement bread() in your kernel?
PostPosted: Tue Jun 06, 2017 8:05 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 21, 2011 9:47 pm
Posts: 261
Location: Tustin, CA USA
Solar wrote:
Code:
loaf * bread()
{
     return malloc( sizeof( loaf ) );
}


Sorry, couldn't resist.


I'm so glad I wasn't the only one.... :lol:

_________________
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber


Top
 Profile  
 
 Post subject: Re: How do you implement bread() in your kernel?
PostPosted: Wed Jun 07, 2017 11:29 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1038
Location: Athens, GA, USA
First, take 4 cups of whole wheat flour, a cup and a half of milk, and two eggs...

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
μή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίαν
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Top
 Profile  
 
 Post subject: Re: How do you implement bread() in your kernel?
PostPosted: Tue Jun 13, 2017 11:28 am 
Offline

Joined: Mon Sep 19, 2016 5:34 am
Posts: 24
OK, how about block_read()?. It was not so delicious as bread() taste like..

_________________
https://github.com/irvanherz/jaura/


Top
 Profile  
 
 Post subject: Re: How do you implement bread() in your kernel?
PostPosted: Sun Aug 13, 2017 2:52 pm 
Offline
Member
Member

Joined: Wed Aug 09, 2017 7:37 am
Posts: 80
I can't help it either. You need wheat, a few other ingredients and yeast 8) search C manuals... that might help


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 7 guests


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 © 2000, 2002, 2005, 2007 phpBB Group