Skip to content

Error: multiple definition of `threadsafe_assign'#71

Closed
Jamaika1 wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
Jamaika1:patch-1
Closed

Error: multiple definition of `threadsafe_assign'#71
Jamaika1 wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
Jamaika1:patch-1

Conversation

@Jamaika1
Copy link

@Jamaika1 Jamaika1 commented May 5, 2025

No description provided.

@Jamaika1
Copy link
Author

Jamaika1 commented May 5, 2025

1 similar comment
@Jamaika1
Copy link
Author

Jamaika1 commented May 5, 2025

tpool_result_t oapv_tpool_sync_obj_delete(oapv_sync_obj_t *sobj);
int oapv_tpool_spinlock_wait(volatile int *addr, int val);
void threadsafe_assign(volatile int *addr, int val);
void threadsafe_assign_oapv(volatile int *addr, int val);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to remove this declaration because it may not be used in other c-code.

}

void threadsafe_assign(volatile int *addr, int val)
void threadsafe_assign_oapv(volatile int *addr, int val)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is recommended to use 'static' function rather than adding suffix ('_oapv').
And the the symbol would not be exported to explicitly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GCC won't accept that. Unless it's static in xeve and openapv. From what I see xeve is no longer updated.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I checked the code, it found the threadsafe_assign() function is not used in openapv.
I think the best way is to remove the fuction in this time.

@tuzm24 tuzm24 requested review from tuzm24 and removed request for tuzm24 May 9, 2025 02:35
@kpchoi
Copy link
Collaborator

kpchoi commented May 9, 2025

This change has applied to PR #88 .
Thanks for suggestion

@kpchoi kpchoi closed this May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants