#include "bgpd/bgp_keepalives.h"
/* clang-format on */
+DEFINE_MTYPE_STATIC(BGPD, BGP_PKAT, "Peer KeepAlive Timer");
+DEFINE_MTYPE_STATIC(BGPD, BGP_COND, "BGP Peer pthread Conditional");
+DEFINE_MTYPE_STATIC(BGPD, BGP_MUTEX, "BGP Peer pthread Mutex");
+
/*
* Peer KeepAlive Timer.
* Associates a peer with the time of its last keepalive.
static struct pkat *pkat_new(struct peer *peer)
{
- struct pkat *pkat = XMALLOC(MTYPE_TMP, sizeof(struct pkat));
+ struct pkat *pkat = XMALLOC(MTYPE_BGP_PKAT, sizeof(struct pkat));
pkat->peer = peer;
monotime(&pkat->last);
return pkat;
static void pkat_del(void *pkat)
{
- XFREE(MTYPE_TMP, pkat);
+ XFREE(MTYPE_BGP_PKAT, pkat);
}
pthread_mutex_destroy(peerhash_mtx);
pthread_cond_destroy(peerhash_cond);
- XFREE(MTYPE_TMP, peerhash_mtx);
- XFREE(MTYPE_TMP, peerhash_cond);
+ XFREE(MTYPE_BGP_MUTEX, peerhash_mtx);
+ XFREE(MTYPE_BGP_COND, peerhash_cond);
}
/*
*/
rcu_read_unlock();
- peerhash_mtx = XCALLOC(MTYPE_TMP, sizeof(pthread_mutex_t));
- peerhash_cond = XCALLOC(MTYPE_TMP, sizeof(pthread_cond_t));
+ peerhash_mtx = XCALLOC(MTYPE_BGP_MUTEX, sizeof(pthread_mutex_t));
+ peerhash_cond = XCALLOC(MTYPE_BGP_COND, sizeof(pthread_cond_t));
/* initialize mutex */
pthread_mutex_init(peerhash_mtx, NULL);