linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about F_RDLCK and F_WRLCK on alpha
@ 2007-11-14 20:52 Oliver Falk
  2007-11-15  3:47 ` U. George
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Falk @ 2007-11-14 20:52 UTC (permalink / raw)
  To: Linux on Alpha processors, linux-kernel, Jay Estabrook

Hi!

Can someone explain me, why we have different define's for WRLCK and
RDLCK within alpha kernel headers:

Alpha system:

asm/fcntl.h:#define F_RDLCK             1
asm-generic/fcntl.h:#ifndef F_RDLCK
asm-generic/fcntl.h:#define F_RDLCK             0
bits/fcntl.h:#define F_RDLCK            1       /* Read lock.  */

Intel system:

asm-generic/fcntl.h:#ifndef F_RDLCK
asm-generic/fcntl.h:#define F_RDLCK             0
bits/fcntl.h:#define F_RDLCK            0       /* Read lock.  */

I would say F_RDLCK should better be 0 as in i386, but I also guess that
changing this would break many things, wouldn't it?

I don't want to tell you my (long) story, how I found that and why I was
searching for it :-(

(Jay, you know what I'm talkin' about, don't you?)


Well, maybe my kernel headers are just packaged up like crap!?


Best,
 Oliver


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question about F_RDLCK and F_WRLCK on alpha
  2007-11-14 20:52 Question about F_RDLCK and F_WRLCK on alpha Oliver Falk
@ 2007-11-15  3:47 ` U. George
  0 siblings, 0 replies; 2+ messages in thread
From: U. George @ 2007-11-15  3:47 UTC (permalink / raw)
  To: Linux on Alpha processors; +Cc: linux-kernel, Jay Estabrook

I suppose this can be better analyzed if the cpp output is presented to 
show exactly how rdlck/wrlck is included/defined .

But the only requirement is that the flags are unique. solong as wrlck 
!= rdlck != unlck every is happy.

There is no expectation that an i386 binary will run on an alpha machine.

there might be an issue if the i386 source code uses "0" or "1" 
constants instead of the WRLCK/RDLCK. And then compiled on the alpha. 
Then it would be out of sync.

I suppose they are different bec the folks at OSF had it defined that 
way. And there was some need to run OSF/alpha bins on a linux/alpha ( 
just a guess on my part )

Oliver Falk wrote:
> Hi!
> 
> Can someone explain me, why we have different define's for WRLCK and
> RDLCK within alpha kernel headers:

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-15  3:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-14 20:52 Question about F_RDLCK and F_WRLCK on alpha Oliver Falk
2007-11-15  3:47 ` U. George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).