Re: [PATCH 2/7] rename locking functions - convert sema_init users

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

 



On Thu, Aug 18, 2005 at 01:59:02PM +0200, jerome lacoste wrote:
> On 8/18/05, Erik Mouw <J.A.K.Mouw@xxxxxxxxxxxxxx> wrote:
> > It defines init_sema() twice. First as sema_init(sp, val), next time as
> > init_sema(sp, val). Gcc doesn't like that. Same for initsema() and
> > initnsema().
> 
> Aren't the lines with sema_init() removed?

Eh, yeah, you're right.

Here is what happens:

#define init_sema(sp, val, c, d)    init_sema(sp, val)
#define initsema(sp, val)           init_sema(sp, val)

Now if you call initsema(foo, bar), gcc will complain like this:

  blah.c:9:22: macro "init_sema" requires 4 arguments, but only 2 given

Cause init_sema() was just redefined with 4 arguments.



Erik

-- 
Erik Mouw
J.A.K.Mouw@xxxxxxxxxxxxxx  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