You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/02/04 14:00:38 UTC
[GitHub] [nuttx] xiaoxiang781216 opened a new pull request, #8434: pthread: Change pthread_self to function
xiaoxiang781216 opened a new pull request, #8434:
URL: https://github.com/apache/nuttx/pull/8434
## Summary
to avoid include unistd.h in pthread.h since link function inside unistd.h is too easy to conflict with the 3rd party library.
## Impact
Minor
## Testing
CI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8434: pthread: Change pthread_self to function
Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #8434:
URL: https://github.com/apache/nuttx/pull/8434#discussion_r1096555944
##########
libs/libc/pthread/pthread_self.c:
##########
@@ -0,0 +1,39 @@
+/****************************************************************************
+ * libs/libc/pthread/pthread_self.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <pthread.h>
+#include <unistd.h>
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: pthread_self
+ ****************************************************************************/
+
+pthread_t pthread_self(void)
+{
+ return gettid();
Review Comment:
Do we need a type cast here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] pkarashchenko commented on pull request #8434: pthread: Change pthread_self to function
Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #8434:
URL: https://github.com/apache/nuttx/pull/8434#issuecomment-1426879453
Somehow the upgrade of microADB didn't solve the CI failure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8434: pthread: Change pthread_self to function
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #8434:
URL: https://github.com/apache/nuttx/pull/8434#issuecomment-1418452283
https://github.com/apache/nuttx/actions/runs/4098214664/jobs/7067171681 is fixed here: https://github.com/apache/mynewt-nimble/pull/1457
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8434: pthread: Change pthread_self to function
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #8434:
URL: https://github.com/apache/nuttx/pull/8434#issuecomment-1418500955
https://github.com/apache/nuttx/actions/runs/4100097451/jobs/7070641033 is fixed here: https://github.com/spiriou/microADB/pull/34
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8434: pthread: Change pthread_self to function
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #8434:
URL: https://github.com/apache/nuttx/pull/8434#issuecomment-1426977539
Yes, because nimble has still some issue to fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8434: pthread: Change pthread_self to function
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #8434:
URL: https://github.com/apache/nuttx/pull/8434#discussion_r1096561399
##########
libs/libc/pthread/pthread_self.c:
##########
@@ -0,0 +1,39 @@
+/****************************************************************************
+ * libs/libc/pthread/pthread_self.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <pthread.h>
+#include <unistd.h>
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: pthread_self
+ ****************************************************************************/
+
+pthread_t pthread_self(void)
+{
+ return gettid();
Review Comment:
Yes, Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] yamt commented on pull request #8434: pthread: Change pthread_self to function
Posted by "yamt (via GitHub)" <gi...@apache.org>.
yamt commented on PR #8434:
URL: https://github.com/apache/nuttx/pull/8434#issuecomment-1469057125
> to avoid include unistd.h in pthread.h since link function inside unistd.h is too easy to conflict with the 3rd party library.
what library has a conflicting link()? just curious.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org