Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Jul 1998 16:20:30 +0400
From:      Dmitrij Tejblum <tejblum@arc.hq.cti.ru>
To:        dg@root.com
Cc:        committers@FreeBSD.ORG, dt@FreeBSD.ORG
Subject:   Re: lockf() 
Message-ID:  <199807071220.QAA08167@arc.hq.cti.ru>
In-Reply-To: Your message of "Tue, 07 Jul 1998 04:03:32 PDT." <199807071103.EAA22543@implode.root.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> >Any unix in the world, including NetBSD, but excluding FreeBSD, have 
> >the lockf() function call. I can easy obtain it from NetBSD. 
> >
> >Does somebody have objections/suggestions/whatever else?
> 
>    I'm familiar with flock(), which FreeBSD of course has, but what does
> "lockf()" do?

This is just a simplified interface for fcntl() advisory record locking. It 
is a SysVism, and now it is standartisied in SUSV2.

Short description:

#include <unistd.h>
int     lockf(int fd, int function, off_t size);

function is one of:

#define F_ULOCK         0	/* unlock locked section */
#define F_LOCK          1	/* lock a section for exclusive use */
#define F_TLOCK         2	/* test and lock a section for exclusive use */
#define F_TEST          3	/* test a section for locks by other processes */

I may post whole manpage, if you want.

Dima



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807071220.QAA08167>