Code refactoring 81/94381/7
authorSangyoon Jang <s89.jang@samsung.com>
Fri, 28 Oct 2016 12:43:20 +0000 (21:43 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Fri, 4 Nov 2016 08:17:42 +0000 (17:17 +0900)
commit4999e0273e0dd0b40ccb22dbaa83772d69b68689
tree1d5fdf1dc6ca92baaaa01a2065d5eaadb37b4630
parent9978b7522e23a43ecf7b0021df62a65683fa99c1
Code refactoring

- Rewrite queue management code.
   Data Struture.
    * struct backend_queue:
     store each backend's informations(backend path, slot num, job list)
    * struct backend_job:
     store each job(request)'s infomations(req type, uid, pkgid, ...)
   The pkgmgr-server has two hash tables which map each backend, each table
   use type(tpk, wgt) and slot number as key.
   And there is another table which stores informations about the job
   currently processed.

   The pkgmgr-server will push job to each queue, pop it at idler, and
   insert the job into the backend info table(using slot num as key).
   When the backend finished the job, the server will get the job info
   and free it(by removing from the table).
   All the memories for the request data will be allocated dynamically,
   and nerver duplicated.

- Remove unused code.
- Rename enums/internal apis.
- Fix some code style.

Change-Id: Ie95b369608dc6675aeccc6a66b255b28ca200059
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
include/pkgmgr-server.h
include/pm-queue.h [deleted file]
include/queue.h [new file with mode: 0644]
src/pkgmgr-server.c
src/pm-queue.c [deleted file]
src/queue.c [new file with mode: 0644]
src/request.c
src/restriction_mode.c
src/signal.c