summaryrefslogtreecommitdiff
path: root/lib/qobj.c
AgeCommit message (Collapse)Author
2023-03-24*: Convert event.h to frrevent.hDonald Sharp
We should probably prevent any type of namespace collision with something else. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-24*: Rename thread.[ch] to event.[ch]Donald Sharp
This is a first in a series of commits, whose goal is to rename the thread system in FRR to an event system. There is a continual problem where people are confusing `struct thread` with a true pthread. In reality, our entire thread.c is an event system. In this commit rename the thread.[ch] files to event.[ch]. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-03-17*: require semicolon after DEFINE_<typesafe...>David Lamparter
Again, see previous commits. Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-17*: replace all random() callsRafael Zalamena
Replace all `random()` calls with a function called `frr_weak_random()` and make it clear that it is only supposed to be used for weak random applications. Use the annotation described by the Coverity Scan documentation to ignore `random()` call warnings. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-11-30lib: make cmd_element & qobj_type constDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-04-27lib: use DECLARE_HASH for qobj hashDavid Lamparter
This changes the qobj node ID hash to use the new typed hash instead of the old hash_* code. Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-19*: Replace hash_cmp function return value to a boolDonald Sharp
The ->hash_cmp and linked list ->cmp functions were sometimes being used interchangeably and this really is not a good thing. So let's modify the hash_cmp function pointer to return a boolean and convert everything to use the new syntax. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-06*: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2017-09-05lib: Hash creation cleanupDonald Sharp
1) Some hash key functions where converting pointers directly to a 32 bit value via downcasting. Pointers are 64 bit on a majority of our platforms. 2) Some hashes were being created with 256 entries, downsize the hash creation size to more appropriate values. 3) Add hash names to hash creation so we can watch the hash via 'show debugging hashtable' Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-01*: update hash_create(), hash_create_size()Quentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-18lib: qobj: MT-guard with rwlockDavid Lamparter
Make qobj_* calls MT-Safe/LF-Blocking. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-16bgpd: shuffle qobj_init()David Lamparter
bgp_master_init is called first thing in main(), so we need to wedge a qobj_init() call in there... this needs some improvement... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-09lib: make qobj NULL-safe/awareDavid Lamparter
reserve qobj ID 0 for a NULL pointer. (No change is needed for lookups since looking up 0 will simply fail and return NULL.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-28zebra/lib: plug several memleaksRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-10-07lib: add "qobj" object-ID infrastructureDavid Lamparter
This adds 64-bit random identifiers as "safe pointers" which are also type-tracked / can have type-specific extension methods. This will be used by both the CLI (to keep safe references while in config editing mode) as well as the Cap'n Proto code (to hand out pointers to the user in a safe way and add per-type handlers) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>