Sync to the latest version.
Can be broken or partially implemented.
This commit is contained in:
16
main.c
16
main.c
@@ -4,18 +4,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define BH_INT_TO_PTR(x) \
|
||||
((void *)((long)(x)))
|
||||
|
||||
#define BH_UINT_TO_PTR(x) \
|
||||
((void *)((unsigned long)(x)))
|
||||
|
||||
#define BH_PTR_TO_INT(x) \
|
||||
((long)(x))
|
||||
|
||||
#define BH_PTR_TO_UINT(x) \
|
||||
((unsigned long)(x))
|
||||
|
||||
size_t ptr_hash(const void *item)
|
||||
{
|
||||
return BH_PTR_TO_INT(item);
|
||||
@@ -59,7 +47,7 @@ void factor_task(void *arg)
|
||||
{
|
||||
printf("Task start\n");
|
||||
fflush(stdout);
|
||||
printf("Factor: %d\n", factor(48));
|
||||
printf("Factor: %d\n", factor(42));
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
@@ -119,7 +107,7 @@ int main()
|
||||
iter = bh_queue_iter_next(queue, NULL);
|
||||
while (iter)
|
||||
{
|
||||
printf("%d\n", (int)bh_queue_iter_value(iter));
|
||||
printf("%d\n", BH_PTR_TO_INT(bh_queue_iter_value(iter)));
|
||||
iter = bh_queue_iter_next(queue, iter);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user