Re: Calling Convention for kernel drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 17, 2008 at 02:46:19PM -0500, Asim wrote:
> My driver functions are called using fast call calling conventions for
> calling driver functions. I'm using a  2.6.18 kernel. Is this standard
> behaviour? I was thinking it always uses stdcall semantics.

No, calling convention depends on architecture, CPU type, the use of
register parameters, etc. etc. There is no standard calling convention.

> Is there any compiler flag I can introduce to make sure it compiles
> with stdcall semantics.

There is a reason the kernel is written in C: the compiler does the
gory details for you. Just stop messing with assembly and use C.


Erik

-- 
Erik Mouw -- mouw@xxxxxxxxxxxx

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux