/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to libssts/MainLoop.c

  • Committer: Gustav Hartvigsson
  • Date: 2016-01-29 13:54:55 UTC
  • mto: This revision was merged to the branch mainline in revision 117.
  • Revision ID: gustav.hartvigsson@gmail.com-20160129135455-6znpc86wj7800mmq
* added a build (build.sh)script that later can be used for other things.
* fixed indentation of the switch/case statments in MainLoop.c 

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
 
251
251
  switch (ring) {
252
252
    case (S_MAIN_LOOP_RING_ONE):
253
 
       s_linked_list_append (self->ring_1_event_handler_list, item);
 
253
      s_linked_list_append (self->ring_1_event_handler_list, item);
254
254
      break;
255
255
    case (S_MAIN_LOOP_RING_TWO):
256
256
      s_linked_list_append (self->ring_2_event_handler_list, item);
257
257
      break;
258
 
     default:
 
258
    default:
259
259
      s_err_print ("Invalid value of the ring parameter for "
260
260
                   "s_main_loop_add_io_pull function.");
261
261
  }
283
283
 
284
284
  switch (ring) {
285
285
    case (S_MAIN_LOOP_RING_ONE):
286
 
       s_linked_list_append (self->ring_1_io_push_list, item);
 
286
      s_linked_list_append (self->ring_1_io_push_list, item);
287
287
      break;
288
288
    case (S_MAIN_LOOP_RING_TWO):
289
289
      s_linked_list_append (self->ring_2_io_push_list, item);
290
290
      break;
291
 
     default:
 
291
    default:
292
292
      s_err_print ("Invalid value of the ring parameter for "
293
293
                   "s_main_loop_add_io_push function.");
294
294
  }
316
316
 
317
317
  switch (ring) {
318
318
    case (S_MAIN_LOOP_RING_ONE):
319
 
       s_linked_list_append (self->ring_1_io_pull_list, item);
 
319
      s_linked_list_append (self->ring_1_io_pull_list, item);
320
320
      break;
321
321
    case (S_MAIN_LOOP_RING_TWO):
322
322
      s_linked_list_append (self->ring_2_io_pull_list, item);
323
323
      break;
324
 
     default:
 
324
    default:
325
325
      s_err_print ("Invalid value of the ring parameter for "
326
326
                   "s_main_loop_add_ function.");
327
327
  }
334
334
                        RunFunc worker_callback,
335
335
                        spointer user_data) {
336
336
  //
337
 
 
338
337
  SMainLoopItem * item = malloc (sizeof (SMainLoopItem));
339
338
  item->state = S_MAIN_LOOP_STATE_DO_WORKERS;
340
339
  item->callback = worker_callback;
343
342
 
344
343
  switch (ring) {
345
344
    case (S_MAIN_LOOP_RING_ONE):
346
 
       s_linked_list_append (self->ring_1_workers_list, item);
 
345
      s_linked_list_append (self->ring_1_workers_list, item);
347
346
      break;
348
347
    case (S_MAIN_LOOP_RING_TWO):
349
348
      s_linked_list_append (self->ring_2_workers_list, item);
350
349
      break;
351
 
     default:
 
350
    default:
352
351
      s_err_print ("Invalid value of the ring parameter for "
353
352
                   "s_main_loop_add_worker function.");
354
353
  }