lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 1 Sep 2006 13:10:04 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
Cc:	Steven Whitehouse <swhiteho@...hat.com>,
	linux-kernel@...r.kernel.org,
	Russell Cattelan <cattelan@...hat.com>,
	David Teigland <teigland@...hat.com>, hch@...radead.org
Subject: Re: [PATCH 02/16] GFS2: Core locking interface


* Jan Engelhardt <jengelh@...ux01.gwdg.de> wrote:

> I suppose so. If they were initialized statically, this function could 
> possibly be dropped.
> 
> >+typedef void lm_lockspace_t;
> >+typedef void lm_lock_t;
> >+typedef void lm_fsdata_t;
> 
> Try to avoid typedefs for
> - simple types like these (int/void/etc.)
> - structures

yeah. If we dont want to expose a type externally, we forward declare 
the structure, and pointers to it can then be used and passed around. 
That's also more type-safe (and obviously more readable) than a typedef 
to void.

> >+		error = glock_wait_internal(gh);
> >+		if (error == GLR_CANCELED) {
> >+			msleep(100);
> 
> msleep is a busy-waiter IIRC. Really want to do that - what about some 
> schedulling?

no. mdelay() is the busy-waiter - msleep() is scheduling based.

> >+			borked = 1;
> >+			serious = error;
> 
> This got me a laugh :)

me too - the hidden joys of code review :-)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ