Commit Graph

4 Commits

Author SHA1 Message Date
Érico Nogueira 5b4396c4a1 Improve error handling and error messages.
- Rrror out clearly on most allocation failures (the others will simply
  segfault). Avoid getting into weird program conditions in case some
  operations fail.
- Improve organization of main(), no function pointer usage should be
  necessary.
- Make main thread also a worker thread: avoid leaving a useless thread
  around simply waiting for others to complete. Also means one less
  thread to launch.
2022-01-21 15:45:34 -03:00
Érico Nogueira fdf8fa3c30 General cleanup.
- actually print error for bad parent
- declare functions as static when necessary
- clean up headers
- clear up error message
2021-09-18 23:48:56 -03:00
Érico Nogueira 7c6fe16e7b Stop using ftw. 2021-09-18 11:23:56 -03:00
Érico Nogueira e24aef5395 Split implementation into two files.
- also fix threadings bugs: threads could leak (if the join loop exited
  due to some error) or non existent threads could be joined (we add the
  created struct member to avoid this)
2021-05-18 00:35:30 -03:00