Changeset - 0cbd80119355
[Not reviewed]
default
0 1 0
LordOfWar - 16 years ago 2009-09-12 01:43:44

I'm back till I have to study for finals^^, i would like to make some modifications to the queue now that I have much more experience with linked lists, thanks to my cs-102 class.

I added some commented code to brainstorm the revised queue system, which I wish to discuss with everyone later today.

Ohnobinki, I has lots of questions for you :p
1 file changed with 17 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -62,6 +62,7 @@ struct general_info {
 
  unsigned short int rendering_clients;//
 
  unsigned short int total_finished_jobs; //
 
  unsigned int total_frames_rendered; //
 
  unsigned int highest_jobnum;
 
} general_info;
 

	
 

	
 
@@ -72,6 +73,7 @@ struct general_info {
 
void status_report_generator(struct distrenjob **distrenjobs_head);
 
void distrenjob_remove(struct distrenjob **head, struct distrenjob *bj);
 

	
 
//struct distrenjob *head(); /*@TODO:declare struct with no starting data */
 
struct distrenjob *distrenjob_get(struct distrenjob *head, jobnum_t jobnum);
 

	
 
/* Global Vars, try to cut down on these */
 
@@ -156,6 +158,21 @@ void finish_frame(struct distrenjob *dis
 
  general_info.total_frames_rendered++; // Increase total frames var for stats
 
}
 

	
 
/* This @TODO: replace queue function*/
 
/* This function creates a structure from starting data, then calls another function to actually add that struct to the queue
 
void make_blendjob(char *name, char *submitter, char *email, int priority, int start_frame, int end_frame){
 
  struct distrenjob *new_distrenjob;
 
  distrenjob->type = 1; /*@TODO: add type to blendjob struct
 
  distrenjob->name = name;
 
  distrenjob->submitter = submitter;
 
  distrenjob->email = email;
 
  distrenjob->priority = priority;
 
  distrenjob->frameset = frameset[end_frame - start_frame + 1];
 

	
 
  /* @TODO: change frame_num_struct_builder to add_blendjob_to_queue
 
  add_blendjob_to_queue(new_distrenjob);
 
}
 
 */
 

	
 
/** Queuer: Adds files to the queue */
 
int queue(struct distrenjob *distrenjob, int type, char *name, char *submitter, char *email, int priority, int mode, int spp, struct frameset *frameset) {
0 comments (0 inline, 0 general)