SV DPI : Import Task returned a value other than 0 or 1

I have a C task declared as void, called from SV through sv_dpi . But when i simulate i am getting the following error.

*F : The imported C task returned a value other than 0 or 1

In reply to Srinath_gandhi:

First of all, you should not be importing C routines as a task unless you plan to have the C task call exported SystemVerilog tasks. Import your C routine as a C void function instead.

If you do intend to have a time-consuming C task, it needs to call a time-consuming exported SV task. The DPI uses a return value for tasks in C that indicate whether or not the current process was disabled or killed. See section 35.9 Disabling DPI tasks and functions in the 1800-2012 LRM