Commit Graph

6 Commits

Author SHA1 Message Date
Harald Welte 5f46605aee pseudotalloc: turn talloc_steal() into #define
Any non-anciant version of talloc implements talloc_steal()
as a #define using the _talloc_steal_loc() symbol.  Let's be
more compatible.

This fix is relevant to using osmo_fsm inside the osmo-ccid-firmware
builds for Cortex-M4.  In this situation, for some strange reason,
libosmcoore is compiled using src/pseudotalloc/talloc.h, but later then
linked against the real libtalloc.

Change-Id: I1ee7f5e9b1002cff37bb8341ad870e1da5f1f9ff
2019-05-18 11:08:40 +02:00
Harald Welte 14c4c498b1 Fix embedded (arm-none-eabi) builds
Due to OS#3360, build testing for arm-none-eabi was unfortunately
skipped for a long time.  This is a number of fixes that make the
compile test pass again.

Related: OS#3360
Change-Id: I88e3c8e1a8786ca2a6a023b0d27c74be200a8588
2018-06-28 10:30:34 +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
Pau Espin 00f4ef7262 pseudotalloc: Add simplistic implementation of talloc_asprintf
fsm.c uses this function. When compiled with --enable-embedded, it
triggers a warning:

fsm.c: In function 'osmo_fsm_inst_alloc':
fsm.c:213:4: warning: implicit declaration of function 'talloc_asprintf' [-Wimplicit-function-declaration]
    fi->name = talloc_asprintf(fi, "%s(%s)", fsm->name, id);

Change-Id: I61cd83d4c8570af1e452c945ac6f194baf7e6ac4
2017-06-22 18:14:18 +00:00
Harald Welte 898ffefde4 add libpseudotalloc as super-simplistic talloc replacement
In tightly embedded builds (--enable-embedded), we want the ability to
replace talloc with a very simple heap allocator to avoid the complexity
of talloc without modifying all our code that assumes talloc.

This will break the hierarchical notion of the allocator, but
libosmo{core,gsm,coding,codec} don't rely on that anyway.

Change-Id: Ie341034076f242a813f081919dd09d845775ad35
2017-05-17 15:15:52 +01:00