Skip to contentSkip to conversation

usema stat() magic

DISCUSSION Mike Shaver 1 participant 1 message Aug 7, 1997 MIPS

lore
Share & tools
lore
#0 lore raw

I'm starting to work on the /dev/usema{,clone} drivers, and it looks pretty conceptually straightforward.

It looks like libc uses some data hidden in the stat structure (dunno what yet, but I'm sure Miguel will need it to be accurate =) ). What I can't figure out is how that data's hidden in the stat structure. I could _completely_ understand an IOCTL on the clone fd to get data, but it doesn't seem to do that. It does an fstat() on the fd it gets back...

I tried looking at the stat data, but I can't see anything in there that leaps out at me. If it's just for diagnostics, I'm not _too_ worried about it, certainly not in the short term, but I have the sinking feeling that there's more to it than that.

It's quite handy that the zero-contention cases are all handled in user-space, BTW, except that my test cases have to get that much more complex because of it. =)

Mike

Signature · 5 lines
#> Mike Shaver ([email protected]) Ingenia Communications Corporation 
#>                 Ignore the man behind the curtain.                  
#>                                                                     
#> "And then I realized that it never should have worked in the first  
#>  place.  Thus, it would not work again until rewritten." --- Anon.