diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-04 07:33:50 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-05 07:14:42 +0100 |
commit | 9dab58fcef9d93976f13e79be44d320ad0586fe0 (patch) | |
tree | e498d927d29c93cf8c252c222eac7a8c43cacbde | |
parent | spec: CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE (diff) | |
download | rtems-central-9dab58fcef9d93976f13e79be44d320ad0586fe0.tar.bz2 |
spec: Fix message queue construct
-rw-r--r-- | spec/rtems/message/req/construct-errors.yml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/rtems/message/req/construct-errors.yml b/spec/rtems/message/req/construct-errors.yml index c4c5d754..19e7b40e 100644 --- a/spec/rtems/message/req/construct-errors.yml +++ b/spec/rtems/message/req/construct-errors.yml @@ -148,7 +148,18 @@ pre-conditions: states: - name: Valid test-code: | - ctx->config.maximum_message_size = MAX_MESSAGE_SIZE; + if ( ctx->config.maximum_pending_messages == UINT32_MAX ) { + /* + * At least on 64-bit systems we need a bit of help to ensure that we + * meet the Big state of the MaxPending pre-condition. The following + * message size is valid with respect to calculations involving only + * the message size. + */ + ctx->config.maximum_message_size = SIZE_MAX - sizeof( uintptr_t ) + + 1 - sizeof( CORE_message_queue_Buffer ); + } else { + ctx->config.maximum_message_size = MAX_MESSAGE_SIZE; + } text: | The maximum message size of the message queue configuration shall be valid. |