summaryrefslogtreecommitdiff
path: root/test/regression/interoperability_test/test_frame/tls_test_director_create.c
blob: 0db64f653a41ecd8d0bb9dda9f94309b3e0aa11e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/***************************************************************************/
/* Copyright (c) 2024 Microsoft Corporation                                */
/* Copyright (c) 2026 Eclipse ThreadX contributors                         */
/*                                                                         */
/* This program and the accompanying materials are made available under    */
/* the terms of the MIT License which is available at                      */
/* https://opensource.org/licenses/MIT.                                    */
/*                                                                         */
/* SPDX-License-Identifier: MIT                                            */
/***************************************************************************/

#include "tls_test_frame.h"

/* Construct tls test director. */
INT tls_test_director_create(TLS_TEST_DIRECTOR** director_ptr_ptr, VOID* description)
{
TLS_TEST_DIRECTOR* director_ptr;

    /* Check parameters. */
    return_value_if_fail(NULL != director_ptr_ptr, TLS_TEST_INVALID_POINTER);

    /* Atempt to allocate the space of test_director. */
    director_ptr = (TLS_TEST_DIRECTOR*)malloc(sizeof(TLS_TEST_DIRECTOR));
    return_value_if_fail(NULL != director_ptr, TLS_TEST_INSTANTIATION_FAILED);

    /* Return director. */
    *director_ptr_ptr = director_ptr;

    /* Intialize the members of the new director instance. */
    director_ptr -> tls_test_registered_test_instances = 0;
    director_ptr -> tls_test_first_instance_ptr = NULL;
    return TLS_TEST_SUCCESS;
}

/* Stub function to avoid link issue. */
void tx_application_define(void *first_unused_memory)
{
}