[sheepdog] [PATCH 09/11] sheep: assert when exec_req are called in the main thread

Liu Yuan namei.unix at gmail.com
Wed Apr 17 05:15:08 CEST 2013


On 04/16/2013 03:24 PM, MORITA Kazutaka wrote:
> @@ -509,6 +509,8 @@ int sheep_exec_req(const struct node_id *nid, struct sd_req *hdr, void *buf)
>  	struct sockfd *sfd;
>  	int ret;
>  
> +	assert(is_worker_thread());
> +
>  	sfd = sheep_get_sockfd(nid);
>  	if (!sfd)
>  		return SD_RES_NETWORK_ERROR;

Why exactly can't we call shep_exec_req in the main thread?

Thanks,
Yuan



More information about the sheepdog mailing list