<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dss/ipc.c, branch next</title>
<subtitle>DSS - dyadic snapshot scheduler</subtitle>
<id>https://git.tue.mpg.de/cgit/dss/atom?h=next</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/dss/atom?h=next'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/'/>
<updated>2017-11-19T01:53:33Z</updated>
<entry>
<title>ipc.c: Remove a dead store.</title>
<updated>2017-11-19T01:53:33Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-11-14T02:18:10Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=be3b0326d868aed97fc4224dcbf0266c303d2871'/>
<id>urn:sha1:be3b0326d868aed97fc4224dcbf0266c303d2871</id>
<content type='text'>
scan-build correctly points out that the value stored to 'name'
is never read.
</content>
</entry>
<entry>
<title>Replace license boilerplate with single line SPDX comments.</title>
<updated>2017-11-19T01:53:25Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-11-06T00:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=1f5ecfacc341f893d73caa0a613d553af33a6cc9'/>
<id>urn:sha1:1f5ecfacc341f893d73caa0a613d553af33a6cc9</id>
<content type='text'>
This gets rid of existing copyright templates in favor of just the
one-liner SPDX (Software Package Data Exchange) notice. All files are
licensed under the GPL-2.0, so the same tag is added to each file. No
copyright is changed by this commit.

Several files (mostly the very short ones) did not contain a license
text so far. By default all files without license information are
under the default license of this package, which is GPL version 2.
This commit adds the missing SPDX line so that now all files except
dss.css, index.html.in, INSTALL, NEWS and README have it.

We also remove author and copyright year, since the author is the same
everywhere, and the year hasn't been updated any more since at least
six years. Accurate information is available from the git log.

The COPYING file can also be removed because the license text at
https://spdx.org/licenses/GPL-2.0.html is immutable.
</content>
</entry>
<entry>
<title>Revert "ipc.c: Use ftok() instead of SuperFastHash."</title>
<updated>2017-10-06T09:43:30Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-09-06T12:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=89c71fccb89dabf45274312c6922a3feb0bdac25'/>
<id>urn:sha1:89c71fccb89dabf45274312c6922a3feb0bdac25</id>
<content type='text'>
This reverts commit c92370affe722f38a85a41d1b5524e4a102b8f4d.

This was not a good idea because ftok(3) hashes, among other
information, the inode number of the file, and this number changes
every time the configuration file is edited.

The revert conflicted slightly to the commit which renamed
get_key_or_die() to get_key() and changed the type of the return
value to key_t, but the conflict was easy to resolve.
</content>
</entry>
<entry>
<title>ipc: Improve error diagnostics for kill.</title>
<updated>2017-07-26T15:53:20Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-04-16T10:48:58Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=3910462d958e9d8163eafba74052fed01c88a5d3'/>
<id>urn:sha1:3910462d958e9d8163eafba74052fed01c88a5d3</id>
<content type='text'>
If dss is not running, the kill command prints "No such file or
directory" because the call to semget(2) fails with ENOENT. This
message is a bit misleading, so let's return -E_NOT_RUNNING in this
case instead.
</content>
</entry>
<entry>
<title>ipc: Combine mutex_lock() and lock_dss().</title>
<updated>2017-07-13T17:08:36Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-04-16T10:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=c9ca5b454afdc78770ead263d081a2b377cafbe8'/>
<id>urn:sha1:c9ca5b454afdc78770ead263d081a2b377cafbe8</id>
<content type='text'>
The former function is only called by the latter, and both are short,
so let's combine them.
</content>
</entry>
<entry>
<title>ipc: Prefer key_t over int for System V IPC keys.</title>
<updated>2017-07-13T17:02:30Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-02-17T14:40:58Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=f6ae5e4753277ea35509c36dc618097b1175d632'/>
<id>urn:sha1:f6ae5e4753277ea35509c36dc618097b1175d632</id>
<content type='text'>
get_key() calls ftok(3), which returns a key_t value. key_t is also
the type which semget(2), the only function which receives the key via
mutex_get(), expects. It's stupid to convert the key_t from ftok(3)
into an int, only to convert it back to key_t later.

This patch changes ipc.c to use key_t everywhere. However, in
mutex_get() we print a log message containing the value of the key,
so the format string must be adjusted accordingly. Unfortunately,
on Linux, key_t is the same as int while on FreeBSD and NetBSD it is
defined as long. To avoid a warning from the compiler we use "%lx"
in the format string and cast the value to long.
</content>
</entry>
<entry>
<title>ipc.c: Use ftok() instead of SuperFastHash.</title>
<updated>2017-06-25T19:35:36Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-02-17T14:29:52Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=c92370affe722f38a85a41d1b5524e4a102b8f4d'/>
<id>urn:sha1:c92370affe722f38a85a41d1b5524e4a102b8f4d</id>
<content type='text'>
ftok(3) uses the identity of the named file to generate a key_t type
System V IPC key, which is easier than computing the key by hashing
the (resolved) pathname of the config file. This change allows to
get rid of the realpath() and the super_fast_hash() implementation.

If ftok(3) fails, presumably because the underlying call to stat(2)
fails, we now simply return a phony identifier, similar to what we did
before in this case. This eliminates the only possible failure path
in get_key_or_die(), so this function is renamed to get_key().
</content>
</entry>
<entry>
<title>ipc.c: Uninline get_key_or_die().</title>
<updated>2017-04-16T10:32:06Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-02-17T14:36:50Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=ae647da612e0edfb607a4fdb251983d6405f6b00'/>
<id>urn:sha1:ae647da612e0edfb607a4fdb251983d6405f6b00</id>
<content type='text'>
This function is rather big, so it's not clear whether it should
be inlined or not. Without the inline attribute, that's up to the
compiler to decide.
</content>
</entry>
<entry>
<title>ipc.c: Constify parameter of get_key_or_die().</title>
<updated>2017-04-16T10:32:06Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-02-17T14:15:10Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=b795331d8f7006e1cd15ddf124baf1384347d2db'/>
<id>urn:sha1:b795331d8f7006e1cd15ddf124baf1384347d2db</id>
<content type='text'>
The function only reads from the location pointed at by the config_file
variable.
</content>
</entry>
<entry>
<title>ipc: Fix error code returned by mutex_lock().</title>
<updated>2017-04-16T10:32:06Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2017-04-16T10:18:11Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/dss/commit/?id=01af36ee3cd794f4332c4898828a31aafe0a939f'/>
<id>urn:sha1:01af36ee3cd794f4332c4898828a31aafe0a939f</id>
<content type='text'>
In the error case do_semop() already returns the error code which
corresponds to errno.
</content>
</entry>
</feed>
