Re: System calls parameter restrictions



On 28 Oct 2006 05:03:19 -0700 David Schwartz <davids@xxxxxxxxxxxxx> wrote:
|
| phil-news-nospam@xxxxxxxx wrote:
|
|> Structs small enough to fit in available register space could be passed
|> in much the same way many archtectures do pass values. It's just a big
|> complex value. What if you were passing a 64 bit integer by value, on a
|> 32 bit machine, knowing that there is really no true value as cuh, but
|> only a joining of a pair of 32 bit integers? It really doesn't matter.
|> It can be dealt with one way or another. It can be loaded into a register
|> or a copy can be made through use of pass by reference (pointer). It's
|> just a matter of how the kernel syscall interface is designed and to the
|> extent such a design depends on it, the ABI.
|
| But that would mean that changing a structure would break the ABI. That
| doesn't sound like it's worth it. Think about structures of unknown
| length, such as 'struct sockaddr'. (How do you tell the compiler a
| structure has unknown length?)

Are you saying change the way a struct is passed? Or changing the value
in a struct?

The compiler can pass structs by value. But I think that is only for
structs with a fixed size.

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2006-10-28-1751@xxxxxxxx |
|------------------------------------/-------------------------------------|
.



Relevant Pages

  • Re: Dynamically load a dll and us it (in a rexx dll)
    ... The available API functions are dependent on the ODBC version ... The default is usually compiler dependent. ... Depending on the data types used in the structs you ... leave .dll out, it just mentioned path. ...
    (comp.os.os2.programmer.misc)
  • Re: Byte aligned structs
    ... 'data packet' via the serial port. ... structs - i get framing errors for alignment when i apply structs on ... How can i get the compiler to byte align rather than word align. ... routines or macros to insert the shorts and integers for writing and to ...
    (comp.sys.acorn.programmer)
  • Re: About casts (and pointers)
    ... > I believe that whether or not the compiler can deduce that no function ... > The C standard makes guarantees about program execution, ... > about the representations of compatible types (of structs) in ... The C Standard gives a guarantee that under certain circumstances ...
    (comp.lang.c)
  • Re: C/C++ memory-order compiled definitions?
    ... kind of precompiled database:-} Note that DATABASE is just a large ... series of initailized structs with nothing obviuosly tying them ... [Is there any hope of getting a Microsoft compiler person to ... void set1start ...
    (microsoft.public.vc.language)
  • RFC: new IL: C (sort of...).
    ... my existing lower-end codegen is just not very flexible. ... a C compiler (which in turn, produces output I can run through my existing ... I may deprecate support for "inline" struct/union declarations (all structs ...
    (comp.lang.misc)