[lkml]   [2000]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Object Oriented Linux
    In <> Erik Andersen ( wrote:
    > On Tue Jul 11, 2000 at 11:55:50AM +0300, Sherif Abou Seda wrote:
    >> i'm trying to change the module of Inter Process Comunication in the Linux
    >> Kernel from Stuctured Programming into Object Oriented Programming but when
    >> i tried to compile the kernel with my code in it, i had some problems in
    >> integrate the kernel which contain both C and C++ code in it
    >> can anyone help me about this

    > you must use

    > #ifdef __cplusplus
    > extern "C" {
    > #endif
    > // C++ headers
    > }

    > to define all C++ function prototypes to avoid c++
    > name mangling,

    It will be not enough. WAY not enough. Kernel does not have malloc and
    friends so new/free can not be used (allocations in kernel should be used
    ONLY when really necessary). Kernel has less then 7K stack so you can not
    put a lot of data there as well. Kernel lacks suppot for rtti and exceptions.
    And so on and so on. In short: even if kernel IS object-oriented it does not
    support C++ usage at all. Even more: this question was raised few times @ lkml
    and leading kernel developer's reaction was always the same: "Linux is free
    software so you can do anything with it, of course. In your home under pillow
    that is. But if we are talking about mainstreem though then do not think ANY
    patches for C++ support will be accepted (may be patches to make header more
    C++ firendly will be accepted but even this is VERY questionable). We have no
    desire to support ANY alien languages in kernel - be it Ada, Pascal,
    Objective C or C++."

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:57    [W:0.020 / U:81.624 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site