Changeset 613d644 in mainline for uspace/srv
- Timestamp:
- 2014-08-26T15:30:15Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0b811da2, 2cc1ec0, da904f7
- Parents:
- cb1fd3e (diff), 1c635d6 (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. - Location:
- uspace/srv
- Files:
-
- 15 edited
-
audio/hound/main.c (modified) (1 diff)
-
bd/sata_bd/sata_bd.c (modified) (1 diff)
-
devman/driver.c (modified) (2 diffs)
-
hid/isdv4_tablet/main.c (modified) (1 diff)
-
hid/remcons/remcons.c (modified) (2 diffs)
-
hid/rfb/main.c (modified) (1 diff)
-
net/ethip/ethip.c (modified) (1 diff)
-
net/inetsrv/inetsrv.c (modified) (1 diff)
-
net/loopip/loopip.c (modified) (1 diff)
-
net/nconfsrv/nconfsrv.c (modified) (1 diff)
-
net/slip/slip.c (modified) (1 diff)
-
ns/ns.c (modified) (1 diff)
-
ns/task.c (modified) (6 diffs)
-
ns/task.h (modified) (1 diff)
-
taskmon/taskmon.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/audio/hound/main.c
rcb1fd3e r613d644 43 43 #include <hound/server.h> 44 44 #include <hound/protocol.h> 45 #include <task.h> 45 46 46 47 #include "hound.h" -
uspace/srv/bd/sata_bd/sata_bd.c
rcb1fd3e r613d644 45 45 #include <loc.h> 46 46 #include <macros.h> 47 #include <task.h> 47 48 48 49 #include <ahci_iface.h> -
uspace/srv/devman/driver.c
rcb1fd3e r613d644 40 40 #include <str_error.h> 41 41 #include <stdio.h> 42 #include <task.h> 42 43 43 44 #include "dev.h" … … 290 291 log_msg(LOG_DEFAULT, LVL_DEBUG, "start_driver(drv=\"%s\")", drv->name); 291 292 292 rc = task_spawnl(NULL, drv->binary_path, drv->binary_path, NULL);293 rc = task_spawnl(NULL, NULL, drv->binary_path, drv->binary_path, NULL); 293 294 if (rc != EOK) { 294 295 log_msg(LOG_DEFAULT, LVL_ERROR, "Spawning driver `%s' (%s) failed: %s.", -
uspace/srv/hid/isdv4_tablet/main.c
rcb1fd3e r613d644 36 36 #include <ipc/mouseev.h> 37 37 #include <inttypes.h> 38 #include <task.h> 38 39 39 40 #include "isdv4.h" -
uspace/srv/hid/remcons/remcons.c
rcb1fd3e r613d644 226 226 227 227 task_id_t task; 228 int rc = task_spawnl(&task, APP_GETTERM, APP_GETTERM, user->service_name, 228 task_wait_t wait; 229 int rc = task_spawnl(&task, &wait, APP_GETTERM, APP_GETTERM, user->service_name, 229 230 "/loc", "--msg", "--", APP_SHELL, NULL); 230 231 if (rc != EOK) { … … 246 247 task_exit_t task_exit; 247 248 int task_retval; 248 task_wait( task, &task_exit, &task_retval);249 task_wait(&wait, &task_exit, &task_retval); 249 250 telnet_user_log(user, "%s terminated %s, exit code %d.", APP_GETTERM, 250 251 task_exit == TASK_EXIT_NORMAL ? "normally" : "unexpectedly", -
uspace/srv/hid/rfb/main.c
rcb1fd3e r613d644 35 35 #include <inttypes.h> 36 36 #include <io/log.h> 37 #include <task.h> 37 38 38 39 #include <abi/fb/visuals.h> -
uspace/srv/net/ethip/ethip.c
rcb1fd3e r613d644 44 44 #include <stdio.h> 45 45 #include <stdlib.h> 46 #include <task.h> 46 47 #include "arp.h" 47 48 #include "ethip.h" -
uspace/srv/net/inetsrv/inetsrv.c
rcb1fd3e r613d644 46 46 #include <stdlib.h> 47 47 #include <sys/types.h> 48 #include <task.h> 48 49 #include "addrobj.h" 49 50 #include "icmp.h" -
uspace/srv/net/loopip/loopip.c
rcb1fd3e r613d644 44 44 #include <stdio.h> 45 45 #include <stdlib.h> 46 #include <task.h> 46 47 47 48 #define NAME "loopip" -
uspace/srv/net/nconfsrv/nconfsrv.c
rcb1fd3e r613d644 48 48 #include <stdlib.h> 49 49 #include <sys/types.h> 50 #include <task.h> 50 51 #include "iplink.h" 51 52 #include "nconfsrv.h" -
uspace/srv/net/slip/slip.c
rcb1fd3e r613d644 43 43 #include <io/log.h> 44 44 #include <errno.h> 45 #include <task.h> 45 46 46 47 #define NAME "slip" -
uspace/srv/ns/ns.c
rcb1fd3e r613d644 66 66 while (true) { 67 67 process_pending_conn(); 68 process_pending_wait();69 68 70 69 ipc_call_t call; -
uspace/srv/ns/task.c
rcb1fd3e r613d644 40 40 #include <macros.h> 41 41 #include <malloc.h> 42 #include <types/task.h> 42 43 #include "task.h" 43 44 #include "ns.h" 44 45 45 46 /* TODO:47 *48 * As there is currently no convention that each task has to be waited49 * for, the NS can leak memory because of the zombie tasks.50 *51 */52 46 53 47 /** Task hash table item. */ … … 195 189 } 196 190 197 hash_table_remove(&task_hash_table, &pr->id);198 191 list_remove(&pr->link); 199 192 free(pr); … … 204 197 void wait_for_task(task_id_t id, ipc_call_t *call, ipc_callid_t callid) 205 198 { 206 sysarg_t retval;207 task_exit_t texit;208 bool remove = false;209 210 199 ht_link_t *link = hash_table_find(&task_hash_table, &id); 211 200 hashed_task_t *ht = (link != NULL) ? … … 218 207 } 219 208 220 if (!ht->finished) { 221 /* Add to pending list */ 222 pending_wait_t *pr = 223 (pending_wait_t *) malloc(sizeof(pending_wait_t)); 224 if (!pr) { 225 retval = ENOMEM; 226 goto out; 227 } 228 229 link_initialize(&pr->link); 230 pr->id = id; 231 pr->callid = callid; 232 list_append(&pr->link, &pending_wait); 209 if (ht->finished) { 210 task_exit_t texit = ht->have_rval ? TASK_EXIT_NORMAL : 211 TASK_EXIT_UNEXPECTED; 212 ipc_answer_2(callid, EOK, texit, ht->retval); 233 213 return; 234 214 } 235 215 236 remove = true; 237 retval = EOK; 238 239 out: 240 if (!(callid & IPC_CALLID_NOTIFICATION)) { 241 texit = ht->have_rval ? TASK_EXIT_NORMAL : TASK_EXIT_UNEXPECTED; 242 ipc_answer_2(callid, retval, texit, ht->retval); 243 } 244 if (remove) 245 hash_table_remove_item(&task_hash_table, link); 216 /* Add to pending list */ 217 pending_wait_t *pr = 218 (pending_wait_t *) malloc(sizeof(pending_wait_t)); 219 if (!pr) { 220 if (!(callid & IPC_CALLID_NOTIFICATION)) 221 ipc_answer_0(callid, ENOMEM); 222 return; 223 } 224 225 link_initialize(&pr->link); 226 pr->id = id; 227 pr->callid = callid; 228 list_append(&pr->link, &pending_wait); 246 229 } 247 230 … … 314 297 ht->retval = IPC_GET_ARG1(*call); 315 298 299 process_pending_wait(); 300 316 301 return EOK; 317 302 } … … 336 321 ht->finished = true; 337 322 323 process_pending_wait(); 324 hash_table_remove(&task_hash_table, &id); 325 338 326 return EOK; 339 327 } -
uspace/srv/ns/task.h
rcb1fd3e r613d644 35 35 36 36 #include <ipc/common.h> 37 #include < task.h>37 #include <abi/proc/task.h> 38 38 39 39 extern int task_init(void); -
uspace/srv/taskmon/taskmon.c
rcb1fd3e r613d644 82 82 83 83 printf(NAME ": Executing %s -c %s -t %s\n", fname, dump_fname, s_taskid); 84 rc = task_spawnl(NULL, fname, fname, "-c", dump_fname, "-t", s_taskid,84 rc = task_spawnl(NULL, NULL, fname, fname, "-c", dump_fname, "-t", s_taskid, 85 85 NULL); 86 86 } else { 87 87 printf(NAME ": Executing %s -t %s\n", fname, s_taskid); 88 rc = task_spawnl(NULL, fname, fname, "-t", s_taskid, NULL);88 rc = task_spawnl(NULL, NULL, fname, fname, "-t", s_taskid, NULL); 89 89 } 90 90
Note:
See TracChangeset
for help on using the changeset viewer.
