예제 #1
0
파일: test3.c 프로젝트: GunioRobot/SVM-1
void vmtest (int n, vm_mode_t trace) {
    int codelen = sizeof(code)/sizeof(Bcode);
    Function f = new_function(2, 0, code + 12, codelen - 12);
    gv[0] = (Value)n;
    gv[1] = (Value)f;

    vm(code, codelen, vs_base, VS_SIZE, gv, GV_SIZE, trace);

    delete_function(f);
}
예제 #2
0
파일: set.c 프로젝트: bminor/mesa-mesa
/**
 * Frees the given set.
 *
 * If delete_function is passed, it gets called on each entry present before
 * freeing.
 */
void
_mesa_set_destroy(struct set *ht, void (*delete_function)(struct set_entry *entry))
{
   if (!ht)
      return;

   if (delete_function) {
      set_foreach (ht, entry) {
         delete_function(entry);
      }
   }
예제 #3
0
파일: vmbench.c 프로젝트: GunioRobot/SVM-1
void vmtest (int x, int y, int z, vm_mode_t mode) {
    int codelen = sizeof(code)/sizeof(Bcode);
    Function f = new_function(3, 0, code + 16, codelen - 16);
    gv[0] = (Value)f;
    gv[1] = (Value)x;
    gv[2] = (Value)y;
    gv[3] = (Value)z;

    vm(code, codelen, vs_base, VS_SIZE, gv, GV_SIZE, mode);

    delete_function(f);
}
예제 #4
0
/**
 * Frees the given hash table.
 *
 * If delete_function is passed, it gets called on each entry present before
 * freeing.
 */
void
_mesa_hash_table_destroy(struct hash_table *ht,
                         void (*delete_function)(struct hash_entry *entry))
{
   if (!ht)
      return;

   if (delete_function) {
      hash_table_foreach(ht, entry) {
         delete_function(entry);
      }
   }
예제 #5
0
/**
 * Frees the given gputop_hash table.
 *
 * If delete_function is passed, it gets called on each entry present before
 * freeing.
 */
void
gputop_hash_table_destroy(struct gputop_hash_table *ht,
                          void (*delete_function)
                          (struct gputop_hash_entry *entry))
{
    if (!ht)
        return;

    if (delete_function) {
        struct gputop_hash_entry *entry;

        gputop_hash_table_foreach(ht, entry) {
            delete_function(entry);
        }
    }
예제 #6
0
 void reset(M ptr2member)
 {
     delete_function(ptr2member);
 }