| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
| |
Generated with
sed -i 's|Copyright.*Andre Noll.*|SPDX-License-Identifier: GPL-2.0 */|g' *.c *.h
followed by manually tweaking the result a bit. No license change intended.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the current API it is impossible to free the memory that was allocated
by stdin_task_register() after schedule() returns. This commit replaces the
APIs defined in stdin.h and stdout.h to remove the memory leaks which are
inevitable with the old API. We also make struct stdin_task and stdout_task
opaque because the API users (client.c, filter.c, recv.c and write.c) should
not be able to manipulate the fields of these structures directly.
The new stdout API differs from the new stdin API only in that stdout_new()
needs an additional argument to let the caller pass in a pointer to the
parent buffer tree node. Other than that, the APIs are symmetric.
Use the opportunity to do the non-blocking dance in std{in,out}_new()
and std{in,out}_free() rather than in the post-monitor functions. This
way we may get rid of the silly ->must_set_nonblock_flag boolean of struct
std{in,out}_task.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GPLv2 line does not add any additional information, so drop
it. This leaves a single line of legalese text for most files, which
is about the amount of screen real estate it deserves.
This patch was created with the following script (plus some manual
fixups):
awk '{
if (NR <= 5) {
gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g")
if (gs != $0)
year = gs
next
}
if (NR == 6 && year != "")
printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year)
print
}'
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Done with
files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2014\)* Andre Noll')
sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2014 Andre Noll/Copyright (C) \1 Andre Noll/1' $files
In previous years we ran a similar script to set the second year in
the range to the current year. This is kind of silly, so let's get
rid of this useless information.
This commit replaces "Copyright (C) A-B" by "Copyright (C) A" in
all file headers, i.e. only the first year (A) is left in. Accurate
information including time stamps for each change can be obtained
from the git history.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mail server on systemlinux.org was down for more than a week
lately, so let's use an alternative official address. This commit
changes all maan@systemlinux.org addresses to maan@tuebingen.mpg.de.
Most .c and .h files contain the email address in the copyright header,
so they must all be patched. Three other files contain the address
for a different reason:
* README lists email and git, gitweb and home page URLs
* configure.ac needs it for configure -h
* version.c contains it for the -V option of all commands
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the current implementation struct task is public so users of this
structure can mess with internal scheduler details as they please. This
has led to many bugs and questionable code in the past. This commit
is the first step to overcome this design mistake. At the end of this
patch series struct task can be made private to sched.c.
This commit introduces the following new public functions:
* task_register,
* task_context,
* sched_shutdown.
It also adds the new public task_info structure which carries the
information passed to the scheduler when a new task is registered. This
structure will stay public while struct task will become private once
all users have been converted.
task_register() is supposed to eventually replace register_task(). The
main difference of the two is that the new function returns a _pointer_
to a task structure which is allocated dynamically. Users are not
supposed to look at the fields of this pointer directly.
task_context() is a temporary helper which can be removed again at the
end of the series. Its sole purpose is to return the context pointer
which was passed at task register time as part of struct task_info.
The final new function, sched_shutdown(), deallocates the task
structures allocated during task_register() to cleanly shut down the
scheduler after all tasks have terminated.
All users need to be converted to the new API. This patch only converts
the stdout task though. The other tasks will be converted in subsequent
patches. The scheduler can tell if a task was registered using the
new API by means of the new ->owned_by_sched bit of struct task.
This boolean variable can also be removed after all tasks have been
converted.
Some users will need to query the exit status of a terminated
task. Hence we keep all tasks on the task list after ->post_select()
returned negative but call neither ->pre_select() nor ->post_select()
any more for such tasks. This leads to the concept of zombie tasks.
|
| |
|
|
|
|
|
|
|
| |
This year, we're really on time. The changes in this patch were
created by the following silly script:
files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2013\)* Andre Noll')
sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2013 Andre Noll/Copyright (C) \1-2014 Andre Noll/1' $files
sed --in-place= -e 's/Copyright (C) 2013 Andre Noll/Copyright (C) 2013-2014 Andre Noll/1' $files
|
| |
|
|
|
|
|
|
|
| |
The stdin/stdout code should restore the flags to the old value to
avoid surprises, for example in shell scripts.
This changes stdin.c and stdout.c to save the old value. It is
restored in ->post_select when the buffer tree node is removed and
no more I/O takes place.
|
| |
|
|
| |
Better late than never.
|
| | |
|
| | |
|
| |
|
|
| |
Hey, this is earlier than last year :)
|
| |
|
|
|
| |
para_client was the last user of the non-btr code in stdin.[ch]
and stdout.[ch]. Remove this unused code and update the documentation.
|
| | |
|
| |
|
|
| |
Not used yet.
|
| |
|
|
| |
This allows filters to change the output buffer size on the fly.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Get rid of sched->select_ret. Tasks shouldn't care about the
return value of the select call.
- Kill task->private_data. Use container_of() instead.
- Remove task->event_handler. It is never necessary and only
makes the code more convoluted. The scheduler unregisters
tasks as soon as either the pre_select or the post_select
functions return an error.
- Rename task->ret to task->error and get rid of a couple
of error fields in other structs that usually only contained
a copy of the task's error value.
This conversion likely introduces many bugs that have to be
shaken out in subsequent patches. Hopefully it will result in
less error-prone code in the long run.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This way it's possible to tell at a later time why
the receiver/filter/writer terminated.
This allows to increase the delay for reconnecting in case
the receiver failed to connect to para_server: Let the receivers
set the error value to -E_RECV_EOF in case a normal end of file
event occurred and check this value when calculating the restart
barrier.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
These two files have changed in 2007, so..
|
| | |
|
| |
|
|
| |
This makes the documentation complete again.
|
| | |
|
| |
|
|
| |
Seems to work, but might still be full of bugs.
|
| |
|
|
|
| |
para_filter/para_audiod needs this. For example, it is pointless to
convert more audiod data if the writing application is no longer active.
|
| |
|
|
| |
This was again straight forward.
|
|
|
This was pretty straight-forward, but it broke audiod badly. The plan
is first to convert para_filter, then para_audiod. It this works out well,
para_server will be converted as well.
|