[PATCH 09/14] bsd-user: Remove used from TaskState

Warner Losh posted 14 patches 4 years, 4 months ago
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>
There is a newer version of this series
[PATCH 09/14] bsd-user: Remove used from TaskState
Posted by Warner Losh 4 years, 4 months ago
The used field of TaskState is write only. Eliminate it.

Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/main.c | 1 -
 bsd-user/qemu.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 48643eeabc..ee84554854 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -210,7 +210,6 @@ void init_task_state(TaskState *ts)
 {
     int i;
 
-    ts->used = 1;
     ts->first_free = ts->sigqueue_table;
     for (i = 0; i < MAX_SIGQUEUE_SIZE - 1; i++) {
         ts->sigqueue_table[i].next = &ts->sigqueue_table[i + 1];
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 22fc3a6c30..431c5cfc03 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -92,7 +92,6 @@ typedef struct TaskState {
 
     struct TaskState *next;
     struct bsd_binprm *bprm;
-    int used; /* non zero if used */
     struct image_info *info;
 
     struct emulated_sigtable sigtab[TARGET_NSIG];
-- 
2.32.0


Re: [PATCH 09/14] bsd-user: Remove used from TaskState
Posted by Philippe Mathieu-Daudé 4 years, 4 months ago
On 9/22/21 08:14, Warner Losh wrote:
> The used field of TaskState is write only. Eliminate it.

The 'used' field ...

> 
> Signed-off-by: Warner Losh <imp@bsdimp.com>
> ---
>   bsd-user/main.c | 1 -
>   bsd-user/qemu.h | 1 -
>   2 files changed, 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Re: [PATCH 09/14] bsd-user: Remove used from TaskState
Posted by Richard Henderson 4 years, 4 months ago
On 9/21/21 11:14 PM, Warner Losh wrote:
> The used field of TaskState is write only. Eliminate it.
> 
> Signed-off-by: Warner Losh<imp@bsdimp.com>
> ---
>   bsd-user/main.c | 1 -
>   bsd-user/qemu.h | 1 -
>   2 files changed, 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~