Commit 5d6068bb authored by Pankaj Kumar's avatar Pankaj Kumar

Fixed compiler warnings, Modified test-cases Makefile & Corrected wrong lock case

parent 7c554dc1
......@@ -184,10 +184,10 @@ static inline hpa_t va2hpa(void *va)
{
return (hpa_t){ __pa(va) };
}
static inline void * hpa2va(hpa_t hpa)
/*static inline void * hpa2va(hpa_t hpa)
{
return __va(hpa_val(hpa));
}
}*/
static inline hva_t hpa2hva(hpa_t hpa)
{
return (hva_t){ (unsigned long)__va(hpa.hpa) };
......
......@@ -100,7 +100,7 @@ void free_cdt_root(struct cdt_root_node *cdt_node)
mutex_unlock(&cdt_cache.lock);
#else
free(cdt_node);
pthread_mutex_lock(&cdt_cache.lock);
pthread_mutex_unlock(&cdt_cache.lock);
#endif
out:
......@@ -183,7 +183,7 @@ int __lcd_cap_init_cspace(struct cspace *cspace)
* for multiple lcd's. This is because slabs are tied to sysfs, and
* it complains when it tries to remove slabs with the same name.)
*/
snprintf(name, 32, "cspace%llu", cspace_id);
snprintf(name, 32, "cspace%llu", (long long) cspace_id);
#ifdef KERNEL
cspace->cnode_table_cache = kmem_cache_create(
name,
......@@ -731,7 +731,6 @@ void __lcd_cap_delete(struct cspace *cspace, cptr_t c)
LCD_ERR("error getting cnode");
goto out1;
}
printf("After __lcd_cnode_get \n\n");
/*
* If the cnode is already marked as free, just return.
......@@ -776,7 +775,6 @@ void __lcd_cap_delete(struct cspace *cspace, cptr_t c)
} while (!done);
printf("After Delete\n");
return;
out2:
......
# Capability test program Makefile
CC = cc
libdir = ../lib
flags = -lpthread -lcap -L $(libdir)
all:
$(CC) -g -o test-cap cap-stuff.c $(flags)
clean:
rm test-cap
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment