OpenCoverage

async_locl.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/async/async_locl.h
Source codeSwitch to Preprocessed file
LineSourceCount
1/*-
2 * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.-
3 *-
4 * Licensed under the OpenSSL license (the "License"). You may not use-
5 * this file except in compliance with the License. You can obtain a copy-
6 * in the file LICENSE in the source distribution or at-
7 * https://www.openssl.org/source/license.html-
8 */-
9-
10/*-
11 * Must do this before including any header files, because on MacOS/X <stlib.h>-
12 * includes <signal.h> which includes <ucontext.h>-
13 */-
14#if defined(__APPLE__) && defined(__MACH__) && !defined(_XOPEN_SOURCE)-
15# define _XOPEN_SOURCE /* Otherwise incomplete ucontext_t structure */-
16# pragma GCC diagnostic ignored "-Wdeprecated-declarations"-
17#endif-
18-
19#if defined(_WIN32)-
20# include <windows.h>-
21#endif-
22-
23#include "internal/async.h"-
24#include <openssl/crypto.h>-
25-
26typedef struct async_ctx_st async_ctx;-
27typedef struct async_pool_st async_pool;-
28-
29#include "arch/async_win.h"-
30#include "arch/async_posix.h"-
31#include "arch/async_null.h"-
32-
33struct async_ctx_st {-
34 async_fibre dispatcher;-
35 ASYNC_JOB *currjob;-
36 unsigned int blocked;-
37};-
38-
39struct async_job_st {-
40 async_fibre fibrectx;-
41 int (*func) (void *);-
42 void *funcargs;-
43 int ret;-
44 int status;-
45 ASYNC_WAIT_CTX *waitctx;-
46};-
47-
48struct fd_lookup_st {-
49 const void *key;-
50 OSSL_ASYNC_FD fd;-
51 void *custom_data;-
52 void (*cleanup)(ASYNC_WAIT_CTX *, const void *, OSSL_ASYNC_FD, void *);-
53 int add;-
54 int del;-
55 struct fd_lookup_st *next;-
56};-
57-
58struct async_wait_ctx_st {-
59 struct fd_lookup_st *fds;-
60 size_t numadd;-
61 size_t numdel;-
62};-
63-
64DEFINE_STACK_OF(ASYNC_JOB)
executed 5 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
never executed: end of block
never executed: end of block
never executed: end of block
never executed: return OPENSSL_sk_num((const OPENSSL_STACK *)sk);
never executed: return (ASYNC_JOB *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);
never executed: return (struct stack_st_ASYNC_JOB *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);
never executed: return (struct stack_st_ASYNC_JOB *)OPENSSL_sk_new_null();
executed 5 times by 1 test: return (struct stack_st_ASYNC_JOB *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n);
Executed by:
  • libcrypto.so.1.1
never executed: return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n);
never executed: return (ASYNC_JOB *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i);
never executed: return (ASYNC_JOB *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, (const void *)ptr);
executed 7 times by 1 test: return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);
Executed by:
  • libcrypto.so.1.1
never executed: return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr);
executed 19 times by 1 test: return (ASYNC_JOB *)OPENSSL_sk_pop((OPENSSL_STACK *)sk);
Executed by:
  • libcrypto.so.1.1
never executed: return (ASYNC_JOB *)OPENSSL_sk_shift((OPENSSL_STACK *)sk);
never executed: return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx);
never executed: return (ASYNC_JOB *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr);
never executed: return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr);
never executed: return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr);
never executed: return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk);
never executed: return (struct stack_st_ASYNC_JOB *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);
never executed: return (struct stack_st_ASYNC_JOB *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, (OPENSSL_sk_copyfunc)copyfunc, (OPENSSL_sk_freefunc)freefunc);
never executed: return (sk_ASYNC_JOB_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare);
0-19
65-
66struct async_pool_st {-
67 STACK_OF(ASYNC_JOB) *jobs;-
68 size_t curr_size;-
69 size_t max_size;-
70};-
71-
72void async_local_cleanup(void);-
73void async_start_func(void);-
74async_ctx *async_get_ctx(void);-
75-
76void async_wait_ctx_reset_counts(ASYNC_WAIT_CTX *ctx);-
77-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.2