Skip to content

Commit

Permalink
remove ddsrt_exit
Browse files Browse the repository at this point in the history
From feedback comment, it really is unnecessary.
  • Loading branch information
poetinger committed Dec 13, 2023
1 parent db375be commit 743e592
Show file tree
Hide file tree
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
Expand Up @@ -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};
Expand Down
9 changes: 0 additions & 9 deletions src/ddsrt/include/dds/ddsrt/process.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions src/ddsrt/src/process/posix/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -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, ...)
Expand Down Expand Up @@ -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);
}
}
}
Expand All @@ -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
{
Expand All @@ -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 */
Expand Down Expand Up @@ -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++)
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 743e592

Please sign in to comment.