Changeset f35749e in mainline for uspace/lib/system/src/system.c
- Timestamp:
- 2025-02-28T23:38:26Z (4 days ago)
- Branches:
- master
- Children:
- 8300c72
- Parents:
- 4285f384
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/system/src/system.c
r4285f384 rf35749e 1 1 /* 2 * Copyright (c) 202 4Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 141 141 } 142 142 143 /** Shut the system down.143 /** Shut down and power the system off. 144 144 * 145 145 * This function is asynchronous. It returns immediately with success … … 151 151 * @return EOK on succes or an error code 152 152 */ 153 errno_t system_ shutdown(system_t *system)153 errno_t system_poweroff(system_t *system) 154 154 { 155 155 async_exch_t *exch = async_exchange_begin(system->sess); 156 errno_t rc = async_req_0_0(exch, SYSTEM_SHUTDOWN); 156 errno_t rc = async_req_0_0(exch, SYSTEM_POWEROFF); 157 async_exchange_end(exch); 158 159 return rc; 160 } 161 162 /** Shut down and restart the system. 163 * 164 * This function is asynchronous. It returns immediately with success 165 * if the system started shutting down. Once shutdown is completed, 166 * the @c shutdown_complete callback is executed. If the shutdown fails, 167 * the @c shutdown_fail callback is executed. 168 * 169 * @param system System control service 170 * @return EOK on succes or an error code 171 */ 172 errno_t system_restart(system_t *system) 173 { 174 async_exch_t *exch = async_exchange_begin(system->sess); 175 errno_t rc = async_req_0_0(exch, SYSTEM_RESTART); 157 176 async_exchange_end(exch); 158 177
Note:
See TracChangeset
for help on using the changeset viewer.