Re: asmlinkage and C++ query!!!

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Do NOT post in HTML, unless you want to look like a spammer.

On Tue, Mar 06, 2007 at 08:14:47PM +0530, Pradeep Singh, TLS-Chennai wrote:
> I googled for reason for using asmlinkage and found some people
> saying asmlinkage is there because of historical reason of using g++
> to compile kernel in good old days.<BR>
>
> Is it true?<BR>

No.

> Second, kernelnewbies wiki gives a good explanation of why is
> asmlinkage used.<BR>

The wiki has the correct answer.

> My second query is why are taking arguments from stack a better idea
> than taking them from registers?<BR> isn't register access supossed
> to be fast?<BR>

Yes, but that isn't the main reason.

> What am i missing here?<BR>

The fact that you want the syscall arguments at a predefined location,
i.e.: on the stack. If some arguments could be in a register depending
on compiler optimisation, it would be impossible for the kernel to
figure out.

> The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
> It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
> this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
> Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
> this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have 
> received this email in error please delete it and notify the sender immediately. Before opening any mail and 
> attachments please check them for viruses and defect.

I hope you *do* realise that your silly disclaimer doesn't allow you to
post to mailing lists in the first place. I have CC'ed your postmaster
so he can fix this.


Erik

- -- 
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF7Yan/PlVHJtIto0RAlQ8AJ9N/Nas6qEx57OcTnTGhHSQ02WDvgCfYSew
rUovMSjH2iRrk5COy94s0E0=
=cXy1
-----END PGP SIGNATURE-----

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[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