Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3



Davide Libenzi wrote:

struct async_syscall {
unsigned long nr_sysc;
unsigned long params[8];
long *result;
};

And what would async_wait() return bak? Pointers to "struct async_syscall"
or pointers to "result"?

Either one has downsides. Pointer to struct async_syscall requires that the caller keep the struct around. Pointer to result requires that the caller always reserve a location for the result.

Does the kernel care about the (possibly rare) case of callers that don't want to pay attention to result? If so, what about adding some kind of caller-specified handle to struct async_syscall, and having async_wait() return the handle? In the case where the caller does care about the result, the handle could just be the address of result.

Chris



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Calling dynamically?
    ... Also, if the caller must call various types of functions, it will need ... to have a generic type (perhaps void* would work) or else need to have ... I might pass an array of pointers with the last ... i.e. a mechanism with a generic calling convention which allows ...
    (comp.lang.cpp)
  • Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3
    ... Pointer to struct async_syscall requires that the ... Pointer to result requires that the caller ... Does the kernel care about the case of callers that don't want ...
    (Linux-Kernel)
  • Re: [RFC][PATCH] flexible array implementation
    ... storage for pointers to the second level. ... If the caller wants to use a spinlock the caller must use ... that we can fit in the base structure or: ... to efficiently pack objects across page boundaries. ...
    (Linux-Kernel)
  • Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3
    ... Pointer to struct async_syscall requires that the ... Pointer to result requires that the caller ... Does the kernel care about the case of callers that don't want ...
    (Linux-Kernel)
  • Re: How to determine if caller is 64-bit from Lsa auth package?
    ... allocations from a Wow64 process will not have more ... to worry about seeing 32-bit pointers on the wire. ... The LSA auth package passes back a MSV1_0_INTERACTIVE_PROFILE ... structure to the caller, which contains UNICODE_STRINGs, which, ...
    (microsoft.public.win32.programmer.kernel)