Commit Graph

73 Commits

Author SHA1 Message Date
pancake
1fb3c0fa0d
Guard more critical sections in cons and core ##threads 2022-09-23 23:29:17 +02:00
pancake
bf9102eaee Two more null deref fixes for cons/task initialization 2022-03-03 10:52:01 +01:00
pancake
a540fbfd98 Fix several null derefs in the tasks api when used from unthready builds 2022-03-03 10:15:02 +01:00
pancake
1c8966bd1c
Fix disable-threads builds 2022-02-06 20:55:06 +01:00
pancake
d3d0e8f3ec Mark all globals (or most of them) as TLS variables ##core 2022-01-21 17:04:56 +01:00
pancake
1afede4079 Fix race conditions in RCoreTasks ##core 2022-01-21 17:04:56 +01:00
Lazula
ad749a0b1a Fix static/R_API function definition formatting
* Remove spaces before parens
* Remove spaces after asterisks
2021-12-21 20:58:12 +01:00
pancake
1db46d8c09
* Use r_w32 apis in RThreadCond for Windows ##windows 2021-09-20 05:41:18 +02:00
Liumeo
302f4949a6
Use pj in core ##refactor (#18267)
* Use pj in core ##refactor

* fix tests
2021-01-22 08:44:44 +01:00
Lazula
243bc871c3 Multiple refactors in io and util ##io ##util ##refactor
* Add r_io_map macros throughout code base
* Update string NULL-checking with renamed functions r_str_get() and r_str_getf()
* Change string NULL-checks throughout code base to use functions
* Add r_str_get_fail() to specify a custom string to return if NULL-check fails
* Mark JSON to be updated with PJ with "TODO PJ"
* Incidental style updates such as missing spaces
2020-12-13 05:09:13 +01:00
Florian Märkl
e408789e34 Fix some Race Conditions with the thready task scheduler (#15667) ##core
* Fix lock ordering of RCoreTaskScheduler.lock vs. RCoreTask.dispatch_lock
* Remove RThreadLock.refs
* Fix a race in tasks
2019-12-18 16:54:37 +01:00
Florian Märkl
e0c3996321 Make Task Scheduling Explicit (#15511) ##core 2019-11-27 16:05:59 +01:00
Florian Märkl
70986cc3ce Partially decouple Tasks from RCore 2019-11-26 12:35:30 +01:00
Florian Märkl
641d4ac765 Add Predicate for Task Dispatch 2019-08-30 00:23:13 +02:00
Florian Märkl
f5c5d0afa3 Make cmd_depth task-local (#14888) 2019-08-24 20:22:31 +02:00
dodococo
70ada267ff AGraph integration with radiff2 ##diff (#14831) 2019-08-18 17:17:44 +02:00
Florian Märkl
d16dfd7b84 Print "Task finished" only if interactive ##core 2019-04-04 14:59:27 +02:00
radare
73f76a99b2
Make RCons.is_interactive() into the RConsContext and improve loading projects in tasks ##cons (#13132) 2019-02-18 06:20:01 +01:00
Florian Märkl
f80a47ab60 Move Palette to RConsContext to make RCoreTask less racy ##cons 2019-01-18 11:58:49 +01:00
Florian Märkl
b0468f6b73 Make =h work in tasks ##threads 2019-01-07 13:24:30 +01:00
David CARLIER
5783cf42c4 Use after fix due to task free on non positive counting (#12138) 2018-11-13 11:56:57 +01:00
Florian Märkl
77d80106e6 Protect task->refcount by tasks lock 2018-11-11 12:11:48 +01:00
radare
01bd0d38d8
Fix #11509 - XNU debugger (#11557)
* Use PT_ATTACHEXC and PT_SIGEXC on mac to get BSD signals as XNU exceptions
2018-09-18 11:35:10 +02:00
Florian Märkl
2883398942 Fix #11081 - Transient Tasks (#11214)
* Make r_th_free() not kill the thread
* Transient Tasks
* Add transient info to & list output
* Use refcounting for Tasks
2018-08-23 13:49:28 +02:00
Florian Märkl
404e4a1b74 Prompt on exit to kill tasks (#11054) 2018-08-12 13:27:45 +02:00
pancake
d55bb122f3 Kill r_io_creat and make it into R_IO_CREAT, honor -ww 2018-08-11 20:44:28 +02:00
Florian Märkl
cc3c87532a
Break all tasks on exit (#11026)
* Break all tasks on exit

* null check in r_cons_context_break()
2018-08-11 16:23:27 +02:00
Florian Märkl
7ab290d170 Fix tasks_lock_enter() 2018-08-01 00:55:28 +01:00
Florian Märkl
7995089d3f Always keep break stack filled in tasks in threads 2018-07-21 16:29:12 +02:00
Florian Märkl
41127c0dfc Simplify core->tasks_lock locking 2018-07-21 16:29:12 +02:00
Florian Märkl
8c8f0a6516 Add &b command 2018-07-21 16:29:12 +02:00
pancake
8159e7c322 Fix last covs 2018-07-13 14:51:34 +02:00
Florian Märkl
8db9631c98 Block Signals when locking core->tasks_lock 2018-07-12 11:36:13 +02:00
Florian Märkl
16d72de010 Use OneShot for cons->event_resize 2018-07-12 11:36:13 +02:00
Florian Märkl
f9f5ddeac5 Add Task OneShots 2018-07-12 11:36:13 +02:00
pancake
b8a9e05b2c Disable =* commands to create tasks. Related to #10515 2018-07-09 00:30:16 +02:00
Florian Märkl
a566e7af99 Add Semaphores to r_util and use them for joining Tasks (#10622)
* Add Semaphores to r_util

* Use Semaphore for joining Tasks
2018-07-05 00:25:57 +02:00
Florian Märkl
7743169a9b Fix double unlock in task_join() (#10519) 2018-06-27 17:06:29 +02:00
Florian Märkl
c6a3b6bc49 Add tasks_running to RCore to reduce tasks overhead (#10514) 2018-06-27 12:59:23 +02:00
Florian Märkl
7bc994803c Join Tasks using Lock 2018-06-26 23:08:24 +02:00
Florian Märkl
5e35ad898b RConsContext (#10450)
* Add RConsContext
* Swap cons in tasks using RConsContext
* Create cons context for background tasks
* Move event_interrupt to RConsContext
* Fix breaking main cons from signal
* Make r_print_is_interrupted() use callback
2018-06-23 12:10:13 +02:00
Florian Märkl
e3849843c5 Make r_core_task_del() thread safe (#10448) 2018-06-22 13:16:29 +02:00
Florian Märkl
3feb95079e Fix Task Coverities #10401 (#10416) 2018-06-20 09:00:58 +08:00
Florian Märkl
43449afcfe Fix joining Tasks 2018-06-17 11:34:03 +02:00
Florian Märkl
9d60de0b25 Call Task Callback 2018-06-17 11:34:03 +02:00
Florian Märkl
fa3ff32569 Fix Task Commands for new Tasks 2018-06-17 11:34:03 +02:00
Florian Märkl
3a81bf367c Update r_core_task_print() 2018-06-17 11:34:03 +02:00
Florian Märkl
6cba82c066 Flatten RThreadMsg into RCoreTask 2018-06-17 11:34:03 +02:00
Florian Märkl
ea98d95e8f Fix an invalid cons load in tasks 2018-06-17 11:34:03 +02:00
Florian Märkl
1d4a2bd678 Add Task Sleeping 2018-06-17 11:34:03 +02:00