Commit Graph

15 Commits

Author SHA1 Message Date
Oliver Smith 9f2814283e Revert "signal.c: Make non-exported tall_sigh_ctx static"
This reverts commit cff2242e68.

The patch broke openbsc:
../../src/libcommon/libcommon.a(talloc_ctx.o): In function `talloc_ctx_init':
/build/openbsc/src/libcommon/talloc_ctx.c:50: undefined reference to `tall_sigh_ctx'

See also:
https://lists.osmocom.org/pipermail/openbsc/2019-March/012843.html

Change-Id: Ib4cb31427a1cad063bc9f1a10b9c3182b314a9f2
2019-03-22 13:25:01 +01:00
Harald Welte cff2242e68 signal.c: Make non-exported tall_sigh_ctx static
As indicated in the commitlog of
Id58ca18eb826b8f4183a7cf0dbb2b38cba702a09,
the symbol was never exported in a header file, so it should be safe
to mark it as static.

Change-Id: I7132ffe9a7efcab226cc639d1b2357f7115bcadf
2019-03-21 16:02:39 +00:00
Harald Welte 8c58af139d signal.c: Fix osmo_signal_talloc_ctx_init()
This function is broken ever since it was added back in 2018 in commit
Id58ca18eb826b8f4183a7cf0dbb2b38cba702a09

Rather than allocating from the user-supplied 'root_ctx', it is
allocating from the context that it's trying to create (which is
NULL at that time, rendering the entire operation more or less
a no-op.  For sure you will not see osmo_signal structures never in
any talloc report.

Change-Id: I922d26815a3baa5be74bd3ee89d498555882d62f
2019-03-21 16:02:31 +00:00
Vadim Yanitskiy a3226f7b9d src/signal.c: cosmetic: use talloc_zero()
Change-Id: I55c6249b0c4c82d5a181001e945ff2eca6e9ca36
2019-03-20 20:42:06 +07:00
Pau Espin 0b6fcb0349 signal: Introduce API osmo_signal_talloc_ctx_init
Otherwise applications need to use "extern void* tall_sigh_ctx" and set
it manually (that symbol is not exported in any header file) or end up
allocating struct signal_handler into the NULL talloc ctx.

API created in a similar way as already existing msgb_talloc_ctx_init(),
but without the pool_size because it's not considered necessary in this
case.

Change-Id: Id58ca18eb826b8f4183a7cf0dbb2b38cba702a09
2018-08-16 21:03:32 +02:00
Harald Welte e08da97570 Fix/Update copyright notices; Add SPDX annotation
Let's fix some erroneous/accidential references to wrong license,
update copyright information where applicable and introduce a
SPDX-License-Identifier to all files.

Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
2017-11-13 01:35:12 +09:00
Neels Hofmeyr 17518fe393 doxygen: unify use of \file across the board
Considering the various styles and implications found in the sources, edit
scores of files to follow the same API doc guidelines around the doxygen
grouping and the \file tag.

Many files now show a short description in the generated API doc that was so
far only available as C comment.

The guidelines and reasoning behind it is documented at
https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation

In some instances, remove file comments and add to the corresponding group
instead, to be shared among several files (e.g. bitvec).

Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
2017-06-23 00:18:23 +00:00
Neels Hofmeyr 87e4550585 doxygen: enable AUTOBRIEF, drop \brief
Especially for short descriptions, it is annoying to have to type \brief for
every single API doc.

Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes
the first sentence of an API doc as the brief description.

Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
2017-06-23 00:18:22 +00:00
Harald Welte 96e2a00d7a update/extend doxygen documentation
It's a pity that even with this patch we still are fare away from having
the whole API documented.  However, at least we have a more solid
foundation.  Updates not only extend the documentation, but also make
sure it is rendered properly in the doxygen HTML.

Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
2017-06-12 21:55:54 +00:00
Harald Welte 2d2e2cca0d Update doxygen annotations in libosmocore
This adds and improves doxygen API descriptions all over libosmocore,
reducing the 'white spots' that don't have any documentation.
2016-05-05 18:49:27 +02:00
Sylvain Munaut dca7d2caaa doc: Fix the Doxygen section endings
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-04-18 21:53:23 +02:00
Harald Welte af8e4352b5 doxygen: Add documentation to signal.[ch] 2011-08-17 17:14:12 +02:00
Pablo Neira Ayuso a10dd35566 signal: use namespace prefix osmo_signal*
Summary of changes:

s/signal_cbfn/osmo_signal_cbfn/g
s/register_signal_handler/osmo_signal_register_handler/g
s/unregister_signal_handler/osmo_signal_unregister_handler/g
s/dispatch_signal/osmo_signal_dispatch/g
2011-05-07 13:00:51 +02:00
Pablo Neira Ayuso 8341934844 include: reorganize headers file to include/osmocom/[gsm|core]
This patch moves all GSM-specific definitions to include/osmocom/gsm.
Moreover, the headers in include/osmocore/ have been moved to
include/osmocom/core.

This has been proposed by Harald Welte and Sylvain Munaunt.

Tested with `make distcheck'.

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:09:28 +01:00
Harald Welte ec8b4501c7 intial checkin of the libosmocore project 2010-02-20 20:34:29 +01:00