Changeset 7bf29e5 in mainline for uspace/app/shutdown/shutdown.h


Ignore:
Timestamp:
2025-01-09T11:29:38Z (7 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
a5c2960e
Parents:
bc3d695 (diff), 4e1221c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge 'upstream/master' into helenraid-para

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/shutdown/shutdown.h

    rbc3d695 r7bf29e5  
    11/*
    2  * Copyright (c) 2006 Jakub Jermar
     2 * Copyright (c) 2024 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup abi_generic
     29/** @addtogroup shutdown
    3030 * @{
    3131 */
    32 /** @file
     32/**
     33 * @file Shut the system down
    3334 */
    3435
    35 #ifndef _ABI_PROC_UARG_H_
    36 #define _ABI_PROC_UARG_H_
     36#ifndef SHUTDOWN_H
     37#define SHUTDOWN_H
    3738
    38 #include <stddef.h>
    39 #include <_bits/native.h>
     39#include <fibril_synch.h>
     40#include <stdbool.h>
    4041
    41 typedef void uspace_thread_function_t(void *);
     42/** Shutdown action */
     43typedef enum {
     44        sd_poweroff = 1,
     45        sd_cancel
     46} sd_action_t;
    4247
    43 /** Structure passed to uinit kernel thread as argument. */
    44 typedef struct uspace_arg {
    45         uspace_addr_t uspace_entry;
    46         uspace_addr_t uspace_stack;
    47         size_t uspace_stack_size;
    48 
    49         uspace_ptr_uspace_thread_function_t uspace_thread_function;
    50         uspace_addr_t uspace_thread_arg;
    51 
    52         uspace_ptr_struct_uspace_arg uspace_uarg;
    53 } uspace_arg_t;
     48/** Shutdown state */
     49typedef struct {
     50        fibril_mutex_t lock;
     51        fibril_condvar_t cv;
     52        bool stopped;
     53        bool failed;
     54} shutdown_t;
    5455
    5556#endif
Note: See TracChangeset for help on using the changeset viewer.