diff mbox

test: linux-gen: fix termination in mmap_vlan_ins

Message ID 1480082762-12164-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit 783ca69b2f6e1ce1d7e2b2e2774d4d475a12cf10
Headers show

Commit Message

Maxim Uvarov Nov. 25, 2016, 2:06 p.m. UTC
exit variable has to be volatile to be visible from thread. Without
that background process is not killed with default optimization level.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
 test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.1.250.gff4ea60

Comments

Maxim Uvarov Nov. 28, 2016, 1:47 p.m. UTC | #1
please review. This need to be in nearest release.

Maxim.

On 11/25/16 17:06, Maxim Uvarov wrote:
> exit variable has to be volatile to be visible from thread. Without

> that background process is not killed with default optimization level.

>

> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

> ---

>   test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c | 2 +-

>   1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c

> index 0682d2d..b91eb53 100644

> --- a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c

> +++ b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c

> @@ -19,7 +19,7 @@

>   #define MAX_PKT_BURST 32

>   #define MAX_WORKERS 1

>   

> -static int exit_thr;

> +static volatile int exit_thr;

>   static int g_ret;

>   

>   struct {
Bill Fischofer Nov. 29, 2016, 11:16 p.m. UTC | #2
On Fri, Nov 25, 2016 at 8:06 AM, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> exit variable has to be volatile to be visible from thread. Without

> that background process is not killed with default optimization level.

>

> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>


Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---

>  test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c

> index 0682d2d..b91eb53 100644

> --- a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c

> +++ b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c

> @@ -19,7 +19,7 @@

>  #define MAX_PKT_BURST 32

>  #define MAX_WORKERS 1

>

> -static int exit_thr;

> +static volatile int exit_thr;

>  static int g_ret;

>

>  struct {

> --

> 2.7.1.250.gff4ea60

>
Maxim Uvarov Nov. 30, 2016, 1:50 p.m. UTC | #3
merged,
Maxim.

On 11/30/16 02:16, Bill Fischofer wrote:
> On Fri, Nov 25, 2016 at 8:06 AM, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

>> exit variable has to be volatile to be visible from thread. Without

>> that background process is not killed with default optimization level.

>>

>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

>

>> ---

>>   test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c | 2 +-

>>   1 file changed, 1 insertion(+), 1 deletion(-)

>>

>> diff --git a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c

>> index 0682d2d..b91eb53 100644

>> --- a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c

>> +++ b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c

>> @@ -19,7 +19,7 @@

>>   #define MAX_PKT_BURST 32

>>   #define MAX_WORKERS 1

>>

>> -static int exit_thr;

>> +static volatile int exit_thr;

>>   static int g_ret;

>>

>>   struct {

>> --

>> 2.7.1.250.gff4ea60

>>
diff mbox

Patch

diff --git a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c
index 0682d2d..b91eb53 100644
--- a/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c
+++ b/test/linux-generic/mmap_vlan_ins/mmap_vlan_ins.c
@@ -19,7 +19,7 @@ 
 #define MAX_PKT_BURST 32
 #define MAX_WORKERS 1
 
-static int exit_thr;
+static volatile int exit_thr;
 static int g_ret;
 
 struct {