void run_upload(const char *ftp_url) {CircularQueue queue;// 初始化环形队列for (int i = 0; i < QUEUE_SIZE; i++) {queue.items[i].data = malloc(BUFFER_SIZE);if (queue.items[i].data == NULL) {fprintf(stderr, "Failed to allocate memory for queue item %d\n", i);exit(EXIT_FAILURE);}queue.items[i].total_size = BUFFER_SIZE;}queue.head = 0;queue.tail = 0;queue.download_finished = 0;pthread_t receive_tid, upload_tid;pthread_mutex_init(&queue.lock, NULL);pthread_cond_init(&queue.cond, NULL);if (pthread_create(&receive_tid, NULL, receive_thread, (void *)&queue) != 0) {fprint