Skip to content

Commit 1aaecf7

Browse files
Minh Tangduynguyenxa
authored andcommitted
lib: posix: Update attribute packed for posix_thread_attr
Add attributed packed for struct posix_thread_attr when arch is RX Signed-off-by: Minh Tang <minh.tang.ue@bp.renesas.com>
1 parent 941eaf2 commit 1aaecf7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/posix/options/posix_internal.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@
2222
*/
2323
#define PTHREAD_OBJ_MASK_INIT 0x80000000
2424

25-
struct posix_thread_attr {
25+
#ifdef CONFIG_RX
26+
struct __packed posix_thread_attr
27+
#else
28+
struct posix_thread_attr
29+
#endif
30+
{
2631
void *stack;
2732
/* the following two bitfields should combine to be 32-bits in size */
28-
uint32_t stacksize : CONFIG_POSIX_PTHREAD_ATTR_STACKSIZE_BITS;
29-
uint16_t guardsize : CONFIG_POSIX_PTHREAD_ATTR_GUARDSIZE_BITS;
33+
uint32_t stacksize: CONFIG_POSIX_PTHREAD_ATTR_STACKSIZE_BITS;
34+
uint16_t guardsize: CONFIG_POSIX_PTHREAD_ATTR_GUARDSIZE_BITS;
3035
int8_t priority;
3136
uint8_t schedpolicy: 2;
3237
bool contentionscope: 1;

0 commit comments

Comments
 (0)