OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 3:05 pm

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
Member
Member

Joined: Mon Sep 19, 2016 5:34 am
Posts: 27
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: 7612
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: 286
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!
Read about my mistakes and missteps with this iteration: Journal

"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: 1925
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
Ordo OS Project
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
Member
Member

Joined: Mon Sep 19, 2016 5:34 am
Posts: 27
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 26 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