acassis commented on a change in pull request #4935:
URL: https://github.com/apache/incubator-nuttx/pull/4935#discussion_r761946005



##########
File path: arch/arm/src/common/arm_tls.c
##########
@@ -0,0 +1,82 @@
+/****************************************************************************
+ * arch/arm/src/common/arm_tls.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 <nuttx/config.h>
+#include <nuttx/arch.h>
+#include <nuttx/tls.h>
+
+#include "arm_internal.h"
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: up_tls_size
+ *
+ * Description:
+ *   Get tls (tdata + tbss) section size
+ *
+ * Returned Value:
+ *   Size of (tdata + tbss)
+ *
+ ****************************************************************************/
+
+int up_tls_size(void)
+{
+  /* Extra 8 byte (2 pointer) according to GCC */

Review comment:
       8 bytes

##########
File path: sched/Kconfig
##########
@@ -600,6 +600,13 @@ config SCHED_USER_IDENTITY
                Those can then be managed using the interfaces.  Child tasks 
will
                inherit the UID and GID of its parent.
 
+config SCHED_THREAD_LOCAL
+       bool "Support __thread keyword"
+       default n
+       depends on ARCH_ARM
+       ---help---
+               The keyword __thread can be used to declare thread local 
variables.

Review comment:
       Please tell more! I think it is important to explain the performance 
gain when using it. I wasn't aware of it until read here: 
https://stackoverflow.com/questions/32245103/how-does-the-gcc-thread-work




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to