<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/systemd.git/src/shared/enable-mempool.c, branch main</title>
<subtitle>github.com: systemd/systemd.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/'/>
<entry>
<title>Turn mempool_enabled() into a weak symbol</title>
<updated>2022-06-29T14:51:52+00:00</updated>
<author>
<name>Zbigniew Jędrzejewski-Szmek</name>
<email>zbyszek@in.waw.pl</email>
</author>
<published>2022-06-12T14:52:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=b01f31954f1c7c4601925173ae2638b572224e9a'/>
<id>b01f31954f1c7c4601925173ae2638b572224e9a</id>
<content type='text'>
Before we had the following scheme:
mempool_enabled() would check mempool_use_allowed, and
libsystemd-shared would be linked with a .c file that provides mempool_use_allowed=true,
while other things would linked with a different .c file with mempool_use_allowed=false.

In the new scheme, mempool_enabled() itself is a weak symbol. If it's
not found, we assume false. So it only needs to be provided for libsystemd-shared,
where it can return false or true.

test-set-disable-mempool is libshared, so it gets the symbol. But then we
actually disable the mempool via envvar. mempool_enable() is called to check
its return value directly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before we had the following scheme:
mempool_enabled() would check mempool_use_allowed, and
libsystemd-shared would be linked with a .c file that provides mempool_use_allowed=true,
while other things would linked with a different .c file with mempool_use_allowed=false.

In the new scheme, mempool_enabled() itself is a weak symbol. If it's
not found, we assume false. So it only needs to be provided for libsystemd-shared,
where it can return false or true.

test-set-disable-mempool is libshared, so it gets the symbol. But then we
actually disable the mempool via envvar. mempool_enable() is called to check
its return value directly.
</pre>
</div>
</content>
</entry>
<entry>
<title>license: LGPL-2.1+ -&gt; LGPL-2.1-or-later</title>
<updated>2020-11-09T04:23:58+00:00</updated>
<author>
<name>Yu Watanabe</name>
<email>watanabe.yu+github@gmail.com</email>
</author>
<published>2020-11-09T04:23:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=db9ecf050165fd1033c6f81485917e229c4be537'/>
<id>db9ecf050165fd1033c6f81485917e229c4be537</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>mempool: only enable mempool use when linked to libsystemd-shared.so</title>
<updated>2018-10-11T09:10:37+00:00</updated>
<author>
<name>Zbigniew Jędrzejewski-Szmek</name>
<email>zbyszek@in.waw.pl</email>
</author>
<published>2018-10-09T14:02:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=a5d8835c78112206bbf0812dd4cb471f803bfe88'/>
<id>a5d8835c78112206bbf0812dd4cb471f803bfe88</id>
<content type='text'>
Mempool use is enabled or disabled based on the mempool_use_allowed symbol that
is linked in.

Should fix assert crashes in external programs caused by #9792.
Replaces #10286.

v2:
- use two different source files instead of a gcc constructor
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mempool use is enabled or disabled based on the mempool_use_allowed symbol that
is linked in.

Should fix assert crashes in external programs caused by #9792.
Replaces #10286.

v2:
- use two different source files instead of a gcc constructor
</pre>
</div>
</content>
</entry>
</feed>
