2009/6/18 Bojan Smojver <[email protected]>
> On Thu, 2009-06-18 at 00:51 +0200, Gavin Sherry wrote:
> > 497 proc_mutex_unlock_it.l_pid = 0; /* pid not
> > actually interesting */
>
> What's in proc_mutex_unlock_it when this happens? What's its size?
>
$1 = {l_type = 0, l_whence = 0, l_start = 0, l_len = 0, l_sysid = 0, l_pid =
0, l_vfs = 0}
(gdb) print sizeof(proc_mutex_unlock_it)
$2 = 24
ptype proc_mutex_unlock_it
type = struct flock {
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
unsigned int l_sysid;
pid_t l_pid;
int l_vfs;
}
>From flock.h:
struct flock {
short l_type;
short l_whence;
#ifndef _LARGE_FILES
#ifndef __64BIT__
off_t l_start;
off_t l_len; /* len = 0 means until end of file */
#endif
#endif
unsigned int l_sysid;
#ifdef _NONSTD_TYPES
ushort l_pid_ext;
ushort l_pid;
#else
pid_t l_pid;
#endif
int l_vfs;
#if defined(_LARGE_FILES) || defined(__64BIT__)
/* If LARGE FILES or 64 BIT then off_t is 64 bits and struct flock
* must be laid out as struct flock64
*/
off_t l_start;
off_t l_len;
#endif
};
Thanks,
Gavin