osmo-pcu/tests/ms
Jacob Erlbeck 444bc82081 tbf: Use C++/talloc magic to support TBF constructors/destructors
The TBF object are currently created by using talloc_zero/talloc_free
directly from plain functions. Therefore C++ constructors and destructors
are not called. So the only initialisation that is done is setting
every member to 0. Non POD members do not have their constructors
called either, which makes it impossible to use the current LListHead
class for real members when the LListHead::m_back member has to be set.

This commit changes the TBF allocation functions to call the
corresponding C++ constructor after the call to talloc_zero and to
register the C++ destructor with the talloc context, so that is is
called before talloc_free actually frees the memory.

With this change, non-POD members and custom
constructors/desctructors can be used with gprs_rlcmac_tbf,
gprs_rlcmac_dl_tbf, and gprs_rlcmac_ul_tbf.

Note that this change is only a single step of the plan to turn the
TBF classes into real C++ classes.

Sponsored-by: On-Waves ehf
2015-08-24 12:23:50 +02:00
..
MsTest.cpp tbf: Use C++/talloc magic to support TBF constructors/destructors 2015-08-24 12:23:50 +02:00
MsTest.err ms: Reduce DL CS level if only a few LLC bytes are left 2015-06-22 10:39:06 +02:00
MsTest.ok ms: Reduce DL CS level if only a few LLC bytes are left 2015-06-22 10:39:06 +02:00