Skip to content

Commit

Permalink
Correct OSSL_sleep for NonStop PUT model by introducing sleep().
Browse files Browse the repository at this point in the history
This fix also removes SPT model support as it was previously deprecated.
Upcoming threading models on the platform should be supportable without change
to this method.

Fixes: #23923
Fixes: #23927
Fixes: #23928

Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #23926)
  • Loading branch information
rsbeckerca authored and nhorman committed Mar 23, 2024
1 parent 24109dc commit 4a9e48f
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions crypto/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,11 @@ void OSSL_sleep(uint64_t millis)
ts.tv_sec = (long int) (millis / 1000);
ts.tv_nsec = (long int) (millis % 1000) * 1000000ul;
nanosleep(&ts, NULL);
# elif defined(__TANDEM)
# if !defined(_REENTRANT)
# elif defined(__TANDEM) && !defined(_REENTRANT)
# include <cextdecs.h(PROCESS_DELAY_)>

/* HPNS does not support usleep for non threaded apps */
PROCESS_DELAY_(millis * 1000);
# elif defined(_SPT_MODEL_)
# include <spthread.h>
# include <spt_extensions.h>

usleep(millis * 1000);
# else
usleep(millis * 1000);
# endif
# else
unsigned int s = (unsigned int)(millis / 1000);
unsigned int us = (unsigned int)((millis % 1000) * 1000);
Expand Down

0 comments on commit 4a9e48f

Please sign in to comment.