Lines Matching refs:wait

313 static void *mbuf_worker_run;	/* wait channel for worker thread */
605 static void *mb_waitchan = &mbuf_table; /* wait channel for all caches */
1583 slab_alloc(mbuf_class_t class, int wait)
1602 if ((class == MC_MBUF || class == MC_CL) && (wait & MCR_COMP))
1920 mbuf_slab_alloc(void *arg, mcache_obj_t ***plist, unsigned int num, int wait)
1932 if ((*list = slab_alloc(class, wait)) != NULL) {
1943 if (!mbuf_cached_above(class, wait) &&
1954 (wait & MCR_NOSLEEP) ? M_DONTWAIT : M_WAIT);
1960 if (mbuf_cached_above(class, wait))
1967 if (wait & MCR_NOSLEEP) {
1968 if (!(wait & MCR_TRYHARD)) {
1977 * willing to be blocked, sleep on the wait channel
1983 mbuf_sleep(class, need, wait))
2305 int wait)
2355 wait |= MCR_COMP;
2356 if (!(wait & MCR_NOSLEEP))
2357 wait |= MCR_FAILOK;
2360 needed = mcache_alloc_ext(m_cache(MC_MBUF), &mp_list, needed, wait);
2375 needed = mcache_alloc_ext(m_cache(cl_class), &clp_list, needed, wait);
2381 needed = mcache_alloc_ext(ref_cache, &ref_list, needed, wait);
2608 m_clalloc(const u_int32_t num, const int wait, const u_int32_t bufsize)
2646 if (i == 0 || (wait & M_DONTWAIT))
2857 freelist_populate(mbuf_class_t class, unsigned int num, int wait)
2872 i = m_clalloc(numpages, wait, m_maxsize(MC_BIGCL));
2877 if (class != MC_BIGCL || (wait & MCR_COMP))
2885 return (m_clalloc(num, wait, m_maxsize(class)) != 0);
2905 if ((o = slab_alloc(MC_BIGCL, wait)) == NULL)
3014 mbuf_cached_above(mbuf_class_t class, int wait)
3018 if (wait & MCR_COMP)
3024 if (wait & MCR_COMP)
3029 if (wait & MCR_COMP)
3034 if (wait & MCR_COMP)
3189 m_get_common(int wait, short type, int hdr)
3192 int mcflags = MSLEEPF(wait);
3204 if (hdr && mac_init_mbuf(m, wait) != 0) {
3217 #define _M_GET(wait, type) m_get_common(wait, type, 0)
3218 #define _M_GETHDR(wait, type) m_get_common(wait, type, 1)
3219 #define _M_RETRY(wait, type) _M_GET(wait, type)
3220 #define _M_RETRYHDR(wait, type) _M_GETHDR(wait, type)
3225 m_get(int wait, int type)
3227 return (_M_GET(wait, type));
3231 m_gethdr(int wait, int type)
3233 return (_M_GETHDR(wait, type));
3237 m_retry(int wait, int type)
3239 return (_M_RETRY(wait, type));
3243 m_retryhdr(int wait, int type)
3245 return (_M_RETRYHDR(wait, type));
3249 m_getclr(int wait, int type)
3253 _MGET(m, wait, type);
3336 int wait)
3340 if (m == NULL && (m = _M_GETHDR(wait, type)) == NULL)
3390 if ((m = _M_GETHDR(wait, type)) == NULL)
3396 (rfa = mcache_alloc(ref_cache, MSLEEPF(wait))) == NULL) {
3411 m_getcl(int wait, int type, int flags)
3414 int mcflags = MSLEEPF(wait);
3442 if (hdr && mac_init_mbuf(m, wait) != 0) {
3453 m_mclget(struct mbuf *m, int wait)
3457 if ((rfa = mcache_alloc(ref_cache, MSLEEPF(wait))) == NULL)
3460 m->m_ext.ext_buf = m_mclalloc(wait);
3471 m_mclalloc(int wait)
3473 int mcflags = MSLEEPF(wait);
3505 m_bigalloc(int wait)
3507 int mcflags = MSLEEPF(wait);
3524 m_mbigget(struct mbuf *m, int wait)
3528 if ((rfa = mcache_alloc(ref_cache, MSLEEPF(wait))) == NULL)
3531 m->m_ext.ext_buf = m_bigalloc(wait);
3541 m_16kalloc(int wait)
3543 int mcflags = MSLEEPF(wait);
3560 m_m16kget(struct mbuf *m, int wait)
3564 if ((rfa = mcache_alloc(ref_cache, MSLEEPF(wait))) == NULL)
3567 m->m_ext.ext_buf = m_16kalloc(wait);
3631 int wait, int wantall, size_t bufsize)
3637 int mcflags = MSLEEPF(wait);
3700 if (mac_mbuf_label_init(m, wait) != 0) {
3752 unsigned int *maxsegments, int wait, int wantall, size_t wantsize)
3759 int mcflags = MSLEEPF(wait);
3856 if (mac_init_mbuf(m, wait) != 0) {
4021 if (pkthdr && mac_init_mbuf(m, wait) != 0) {
4070 m_getpacket_how(int wait)
4074 return (m_getpackets_internal(&num_needed, 1, wait, 1,
4387 * The wait parameter is a choice of M_WAIT/M_DONTWAIT from caller.
4392 m_copym(struct mbuf *m, int off0, int len, int wait)
4423 n = _M_RETRY(wait, m->m_type);
4483 m_copym_with_hdrs(struct mbuf *m, int off0, int len0, int wait,
4489 int mcflags = MSLEEPF(wait);
4539 if (top == NULL && mac_mbuf_label_init(n, wait) != 0) {
4858 m_split(struct mbuf *m0, int len0, int wait)
4860 return (m_split0(m0, len0, wait, 1));
4864 m_split0(struct mbuf *m0, int len0, int wait, int copyhdr)
4875 _MGETHDR(n, wait, m0->m_type);
4886 n->m_next = m_split(m, len, wait);
4899 _MGET(n, wait, m->m_type);
5928 mbuf_sleep(mbuf_class_t class, unsigned int num, int wait)
5935 if (mbuf_cached_above(class, wait)) {
5941 m_reclaim(class, num, (wait & MCR_COMP));
5947 } else if (mbuf_cached_above(class, wait)) {
5951 } else if (wait & MCR_TRYHARD) {
5960 mbuf_waiter_inc(class, (wait & MCR_COMP));
5962 VERIFY(!(wait & MCR_NOSLEEP));
5977 mbuf_waiter_dec(class, (wait & MCR_COMP));
5983 } else if (mbuf_cached_above(class, wait)) {