Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove ddsrt_exit
Browse files Browse the repository at this point in the history
From feedback comment, it really is unnecessary.
poetinger committed Dec 13, 2023

Unverified

The email in this signature doesn’t match the committer email.
1 parent db375be commit 743e592
Showing 4 changed files with 6 additions and 21 deletions.
1 change: 0 additions & 1 deletion src/core/xtests/symbol_export/symbol_export.c
Original file line number Diff line number Diff line change
@@ -848,7 +848,6 @@ int main (int argc, char **argv)
ddsrt_getpid ();
ddsrt_getprocessname ();
ddsrt_abort ();
ddsrt_exit(0);

// ddsrt/time.h
ddsrt_mtime_t mt = { .v = 0};
9 changes: 0 additions & 9 deletions src/ddsrt/include/dds/ddsrt/process.h
Original file line number Diff line number Diff line change
@@ -79,15 +79,6 @@ ddsrt_getprocessname(void);
DDS_EXPORT void
ddsrt_abort (void) ddsrt_attribute_noreturn;

/**
* @brief Performs a normal process termination.
*
* @param status
* @returns The least significant byte of `status` is returned to the parent.
*/
DDS_EXPORT void
ddsrt_exit(int status) ddsrt_attribute_noreturn;

#if defined (__cplusplus)
}
#endif
5 changes: 0 additions & 5 deletions src/ddsrt/src/process/posix/process.c
Original file line number Diff line number Diff line change
@@ -90,8 +90,3 @@ ddsrt_abort(void)
abort();
}

void
ddsrt_exit(int status)
{
exit(status);
}
12 changes: 6 additions & 6 deletions src/tools/ddsperf/ddsperf.c
Original file line number Diff line number Diff line change
@@ -391,7 +391,7 @@ static void verrorx (int exitcode, const char *fmt, va_list ap)
{
vprintf (fmt, ap);
fflush (stdout);
ddsrt_exit (exitcode);
exit (exitcode);
}

static void error2 (const char *fmt, ...)
@@ -728,7 +728,7 @@ static uint32_t pubthread (void *varg)
{
printf ("dds_register_instance failed: %d\n", result);
fflush (stdout);
ddsrt_exit (2);
exit (2);
}
}
}
@@ -751,7 +751,7 @@ static uint32_t pubthread (void *varg)
{
printf ("request loan error: %d\n", result);
fflush (stdout);
ddsrt_exit (2);
exit (2);
}
else
{
@@ -765,7 +765,7 @@ static uint32_t pubthread (void *varg)
printf ("write error: %d\n", result);
fflush (stdout);
if (result != DDS_RETCODE_TIMEOUT)
ddsrt_exit (2);
exit (2);
/* retry with original timestamp, it really is just a way of reporting
blocking for an exceedingly long time, but do force a fresh time stamp
for the next sample */
@@ -976,7 +976,7 @@ static int check_eseq (struct eseq_admin *ea, uint32_t seq, uint32_t keyval, uin
if (keyval >= ea->nkeys)
{
printf ("received key %"PRIu32" >= nkeys %u\n", keyval, ea->nkeys);
ddsrt_exit (3);
exit (3);
}
ddsrt_mutex_lock (&ea->lock);
for (uint32_t i = 0; i < ea->nph; i++)
@@ -1970,7 +1970,7 @@ EXAMPLES:\n\
running for 10s\n\
", argv0, argv0, argv0);
fflush (stdout);
ddsrt_exit (3);
exit (3);
}

struct string_int_map_elem {

0 comments on commit 743e592

Please sign in to comment.