<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/stdio/_flock_stub.c, branch release/6.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2005-11-03T00:35:26+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2005-11-03T00:35:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3640cb54210edbb7edbf1b12ef0127ecfcea967d'/>
<id>3640cb54210edbb7edbf1b12ef0127ecfcea967d</id>
<content type='text'>
'RELENG_6_0_0_RELEASE'.

This commit was manufactured to restore the state of the 6.0-RELEASE image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_6_0_0_RELEASE'.

This commit was manufactured to restore the state of the 6.0-RELEASE image.
</pre>
</div>
</content>
</entry>
<entry>
<title>Backout the previous revision due to objections.</title>
<updated>2004-03-09T04:51:58+00:00</updated>
<author>
<name>John Birrell</name>
<email>jb@FreeBSD.org</email>
</author>
<published>2004-03-09T04:51:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=44fce14365cd2e9b9b2575fdf1b2eb21c984765d'/>
<id>44fce14365cd2e9b9b2575fdf1b2eb21c984765d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>On 4.X it was possible for an application to initialise a local FILE</title>
<updated>2004-03-09T02:44:59+00:00</updated>
<author>
<name>John Birrell</name>
<email>jb@FreeBSD.org</email>
</author>
<published>2004-03-09T02:44:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=59fac1825f4658dfb5d2abddba5125ef493059db'/>
<id>59fac1825f4658dfb5d2abddba5125ef493059db</id>
<content type='text'>
structure and call stdio functions. In 5.X this was broken when FILE
locking was introduced into libc.

This change makes most (relevant) stdio functions work again when the
_extra file in FILE isn't initialised (and can't be without a libc
function to do it since the __sFILEX structure is private to libc).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
structure and call stdio functions. In 5.X this was broken when FILE
locking was introduced into libc.

This change makes most (relevant) stdio functions work again when the
_extra file in FILE isn't initialised (and can't be without a libc
function to do it since the __sFILEX structure is private to libc).
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the style of the SCM ID's.</title>
<updated>2002-03-22T21:53:29+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2002-03-22T21:53:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=333fc21e3cd79bca0c94d7722c5a56cb5ad078d1'/>
<id>333fc21e3cd79bca0c94d7722c5a56cb5ad078d1</id>
<content type='text'>
I believe have made all of libc .c's as consistent as possible.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I believe have made all of libc .c's as consistent as possible.
</pre>
</div>
</content>
</entry>
<entry>
<title>To be consistent, use the __weak_reference macro from &lt;sys/cdefs.h&gt;</title>
<updated>2001-04-10T04:11:50+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2001-04-10T04:11:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=54fd7f685f42878f99a2e2d8428d084f9b1125ab'/>
<id>54fd7f685f42878f99a2e2d8428d084f9b1125ab</id>
<content type='text'>
instead of #pragma weak to create weak definitions.  This macro is
improperly named, though, since a weak definition is not the same
thing as a weak reference.

Suggested by:	bde
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
instead of #pragma weak to create weak definitions.  This macro is
improperly named, though, since a weak definition is not the same
thing as a weak reference.

Suggested by:	bde
</pre>
</div>
</content>
</entry>
<entry>
<title>Hide the definition of struct __sFILEX and add the needed</title>
<updated>2001-03-01T05:22:14+00:00</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2001-03-01T05:22:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=45d80087483bd81f5ba69a7bbb3b5b5ba954d97c'/>
<id>45d80087483bd81f5ba69a7bbb3b5b5ba954d97c</id>
<content type='text'>
lock definitions to it.  flockfile state is now allocated
along with the rest of FILE.  This eliminates the need for a
separate allocation of flockfile state as well as eliminating
the mutex/lock used to serialize its allocation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lock definitions to it.  flockfile state is now allocated
along with the rest of FILE.  This eliminates the need for a
separate allocation of flockfile state as well as eliminating
the mutex/lock used to serialize its allocation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Correctly handle the race itself, too (don't leave it locked).</title>
<updated>2001-02-23T17:55:01+00:00</updated>
<author>
<name>Brian Feldman</name>
<email>green@FreeBSD.org</email>
</author>
<published>2001-02-23T17:55:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=75d4fd11cb84b72aacd136f08772a5556d601f17'/>
<id>75d4fd11cb84b72aacd136f08772a5556d601f17</id>
<content type='text'>
This is about to be replaced anyway by initialization explicitly
instead of lazily, and reducing the complexity of it.  As it is
now, this will work fine, however.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is about to be replaced anyway by initialization explicitly
instead of lazily, and reducing the complexity of it.  As it is
now, this will work fine, however.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use the right names to call pthread_mutex_{,un}lock so that things</title>
<updated>2001-02-23T06:26:22+00:00</updated>
<author>
<name>Brian Feldman</name>
<email>green@FreeBSD.org</email>
</author>
<published>2001-02-23T06:26:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=93f9377a7cacec5615316931f5ce5348937413c3'/>
<id>93f9377a7cacec5615316931f5ce5348937413c3</id>
<content type='text'>
work in both the libc only and libc/libc_r case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
work in both the libc only and libc/libc_r case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the problems I (and others, undoubtedly) have been having for a</title>
<updated>2001-02-23T04:59:12+00:00</updated>
<author>
<name>Brian Feldman</name>
<email>green@FreeBSD.org</email>
</author>
<published>2001-02-23T04:59:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=452420419048350b3f6903e3c0e0dc890dcb57cd'/>
<id>452420419048350b3f6903e3c0e0dc890dcb57cd</id>
<content type='text'>
while with threaded software in -CURRENT acting very "weird".  It has
seemed, for example, in Mozilla that threads attempting to do host
lookups have been locking up.  That's exactly the case.

There was a race condition in the implementation of the initialization
of the mutex used to protect FILE operations, first of all: multiple
instances of FLOCKFILE() in libc could occur on the same FILE at
the same time and cause strange behavior by overwriting eachothers'
creation of the mutex and the rest of the file lock.

Secondly, it's not appropriate to test the "validity" of the file
descriptor referenced by the FILE; if the code is calling FLOCKFILE()
or FUNLOCKFILE(), it wants the FILE to be locked or unlocked, not
to be locked or unlocked on the condition that _file is &gt;= 0.  This
also could quite easily cause leaks by failing to perform the lock or
unlock operation when it actually is needed.

Mozilla now works again on -CURRENT when linked to libc_r.so.5 and
libc.so.5.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
while with threaded software in -CURRENT acting very "weird".  It has
seemed, for example, in Mozilla that threads attempting to do host
lookups have been locking up.  That's exactly the case.

There was a race condition in the implementation of the initialization
of the mutex used to protect FILE operations, first of all: multiple
instances of FLOCKFILE() in libc could occur on the same FILE at
the same time and cause strange behavior by overwriting eachothers'
creation of the mutex and the rest of the file lock.

Secondly, it's not appropriate to test the "validity" of the file
descriptor referenced by the FILE; if the code is calling FLOCKFILE()
or FUNLOCKFILE(), it wants the FILE to be locked or unlocked, not
to be locked or unlocked on the condition that _file is &gt;= 0.  This
also could quite easily cause leaks by failing to perform the lock or
unlock operation when it actually is needed.

Mozilla now works again on -CURRENT when linked to libc_r.so.5 and
libc.so.5.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the current libc breakage in current:</title>
<updated>2001-02-16T06:11:22+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2001-02-16T06:11:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=91e1be28dc5fb82ea96453186c70cb58d9650d50'/>
<id>91e1be28dc5fb82ea96453186c70cb58d9650d50</id>
<content type='text'>
o Back out the __std* stuff.  Can't figure out how to do this right now,
  so we'll save it for late.
o use _up as a pointer for extra fields that we need to access.
o back out the libc major version bump.

Submitted by: green
reviewed by: peter, imp, green, obrien (to varying degrees).

We'll fix the "how do we stop encoding sizeof(FILE) in binaries" part
later.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
o Back out the __std* stuff.  Can't figure out how to do this right now,
  so we'll save it for late.
o use _up as a pointer for extra fields that we need to access.
o back out the libc major version bump.

Submitted by: green
reviewed by: peter, imp, green, obrien (to varying degrees).

We'll fix the "how do we stop encoding sizeof(FILE) in binaries" part
later.
</pre>
</div>
</content>
</entry>
</feed>
