• Home
  • Raw
  • Download

Lines Matching refs:cx

312 lws_log_emit_cx_file(struct lws_log_cx *cx, int level, const char *line,  in lws_log_emit_cx_file()  argument
315 int fd = (int)(intptr_t)cx->stg; in lws_log_emit_cx_file()
327 lws_log_use_cx_file(struct lws_log_cx *cx, int _new) in lws_log_use_cx_file() argument
331 if (_new > 0 && cx->refcount == 1) { in lws_log_use_cx_file()
332 fd = open((const char *)cx->opaque, in lws_log_use_cx_file()
336 (const char *)cx->opaque, errno); in lws_log_use_cx_file()
337 cx->stg = (void *)(intptr_t)fd; in lws_log_use_cx_file()
342 fd = (int)(intptr_t)cx->stg; in lws_log_use_cx_file()
344 if (_new <= 0 && cx->refcount == 0 && fd >= 0) { in lws_log_use_cx_file()
346 cx->stg = (void *)(intptr_t)-1; in lws_log_use_cx_file()
356 __lws_logv(lws_log_cx_t *cx, lws_log_prepend_cx_t prep, void *obj, in __lws_logv() argument
374 if (!cx) { in __lws_logv()
378 cx = &log_cx; in __lws_logv()
381 cxp = cx; in __lws_logv()
383 if (!(cx->lll_flags & (uint32_t)filter)) in __lws_logv()
391 if (cx->lll_flags & LLLF_LOG_TIMESTAMP) in __lws_logv()
412 cxp = cx; in __lws_logv()
453 if (cx->lll_flags & LLLF_LOG_CONTEXT_AWARE) in __lws_logv()
454 cx->u.emit_cx(cx, filter, buf, lws_ptr_diff_size_t(p, buf)); in __lws_logv()
456 cx->u.emit(filter, buf); in __lws_logv()
473 void _lws_log_cx(lws_log_cx_t *cx, lws_log_prepend_cx_t prep, void *obj, in _lws_log_cx() argument
478 if (!cx) in _lws_log_cx()
479 cx = &log_cx; in _lws_log_cx()
482 __lws_logv(cx, prep, obj, filter, _fun, format, ap); in _lws_log_cx()
501 int lwsl_visible_cx(lws_log_cx_t *cx, int level) in lwsl_visible_cx() argument
503 return !!(cx->lll_flags & (uint32_t)level); in lwsl_visible_cx()
507 lwsl_refcount_cx(lws_log_cx_t *cx, int _new) in lwsl_refcount_cx() argument
509 if (!cx) in lwsl_refcount_cx()
513 cx->refcount++; in lwsl_refcount_cx()
515 assert(cx->refcount); in lwsl_refcount_cx()
516 cx->refcount--; in lwsl_refcount_cx()
519 if (cx->refcount_cb) in lwsl_refcount_cx()
520 cx->refcount_cb(cx, _new); in lwsl_refcount_cx()
524 lwsl_hexdump_level_cx(lws_log_cx_t *cx, lws_log_prepend_cx_t prep, void *obj, in lwsl_hexdump_level_cx() argument
530 if (!lwsl_visible_cx(cx, hexdump_level)) in lwsl_hexdump_level_cx()
534 _lws_log_cx(cx, prep, obj, hexdump_level, NULL, in lwsl_hexdump_level_cx()
540 _lws_log_cx(cx, prep, obj, hexdump_level, NULL, in lwsl_hexdump_level_cx()
545 _lws_log_cx(cx, prep, obj, hexdump_level, NULL, "\n"); in lwsl_hexdump_level_cx()
571 _lws_log_cx(cx, prep, obj, hexdump_level, NULL, "%s", line); in lwsl_hexdump_level_cx()
575 _lws_log_cx(cx, prep, obj, hexdump_level, NULL, "\n"); in lwsl_hexdump_level_cx()