Merge pull request 'vxtss library update and vxtss_symlist implementation' (#26) from vxtss_symlist into master

Reviewed-on: http://13.234.246.121:3000/Neominds/ossl35vx69/pulls/26
Reviewed-by: Siddhant Singh <siddhant.singh@neominds.in>
This commit is contained in:
2026-07-30 19:35:30 +05:30
committed by neelimap
parent 87219deb19
commit d79b382c72
13 changed files with 556 additions and 80 deletions
+8 -11
View File
@@ -55,10 +55,13 @@
# if defined(OPENSSL_SYS_VXWORKS) && defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG)
#include <taskLib.h>
/* threads.h cannot be included from C++ files, so define these types */
typedef int once_flag;
typedef unsigned int tss_t;
# ifndef __cplusplus
# endif
#define MAX_STR_LEN 64
typedef unsigned int tss_t;
typedef struct {
BOOL done;
SEM_ID sem;
char run_once_arg[MAX_STR_LEN];
} once_flag;
# endif
#ifdef __cplusplus
@@ -523,13 +526,7 @@ typedef once_flag CRYPTO_ONCE;
typedef tss_t CRYPTO_THREAD_LOCAL;
typedef TASK_ID CRYPTO_THREAD_ID;
typedef struct
{
int initialized;
SEM_ID sem;
}CRYPTO_ONCE_STATIC_INIT;
# define ONCE_FLAG_INIT {0, NULL}
#define ONCE_FLAG_INIT { 0, NULL, { '\0' } }
# define CRYPTO_ONCE_STATIC_INIT ONCE_FLAG_INIT
# else
+60
View File
@@ -0,0 +1,60 @@
/* vxtss_symlist.h - VxWorks TSS symbol tracking interface */
#ifndef __VX_TSS_SYMLIST_H__
#define __VX_TSS_SYMLIST_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <vxWorks.h>
#include <taskLib.h>
#include <openssl/crypto.h>
/* Basic tss sym state types */
typedef enum {
TSS_SYMLIST_STATE_INVALID = 0,
TSS_SYMLIST_STATE_NEW,
TSS_SYMLIST_STATE_ADDED,
TSS_SYMLIST_STATE_FAILED,
} tss_sym_state;
typedef struct {
void *var; /* task-specific variable */
void (*dtor)(void *); /* optional destructor */
} tss_entry_t;
/* Initialize - deinitialize TSS sym */
int tss_sym_init(void);
int tss_sym_deinit(void);
/*
* Add new symbol entry
*/
int tss_symlist_add_new(TASK_ID taskid,
char *run_once_arg_str,
char *tss_key_name,
tss_t *tss_key,
tss_sym_state state);
/* Get the first task ID with matching run_once_arg_string */
TASK_ID
tss_symlist_get_first_tid(char *run_once_arg_string);
/*
* Check and populate keys for current task based on run_once_arg_str
*/
void
tss_symlist_clone_entries_for_new_task(TASK_ID tid, char *run_once_arg_string);
/* Display the tss symbol table */
int
tss_symlist_show(void);
#ifdef __cplusplus
}
#endif
#endif /* __VX_TSS_SYMLIST_H__ */