m_process_code_t code, void *data,
m_host_t host, int argc, char **argv);
XBT_PUBLIC(void) MSG_process_kill(m_process_t process);
-XBT_PUBLIC(int) MSG_process_killall(int reset_PIDs);
+XBT_PUBLIC(int) MSG_process_killall(long int reset_PIDs);
XBT_PUBLIC(MSG_error_t) MSG_process_change_host(m_process_t process, m_host_t host);
XBT_PUBLIC(void*) MSG_process_get_data(m_process_t process);
XBT_PUBLIC(MSG_error_t) MSG_process_set_data(m_process_t process, void *data);
XBT_PUBLIC(m_host_t) MSG_process_get_host(m_process_t process);
-XBT_PUBLIC(m_process_t) MSG_process_from_PID(int PID);
-XBT_PUBLIC(int) MSG_process_get_PID(m_process_t process);
-XBT_PUBLIC(int) MSG_process_get_PPID(m_process_t process);
+XBT_PUBLIC(m_process_t) MSG_process_from_PID(long int PID);
+XBT_PUBLIC(long int) MSG_process_get_PID(m_process_t process);
+XBT_PUBLIC(long int) MSG_process_get_PPID(m_process_t process);
XBT_PUBLIC(const char *)MSG_process_get_name(m_process_t process);
-XBT_PUBLIC(int) MSG_process_self_PID(void);
-XBT_PUBLIC(int) MSG_process_self_PPID(void);
+XBT_PUBLIC(long int) MSG_process_self_PID(void);
+XBT_PUBLIC(long int) MSG_process_self_PPID(void);
XBT_PUBLIC(m_process_t) MSG_process_self(void);
XBT_PUBLIC(MSG_error_t) MSG_process_suspend(m_process_t process);
XBT_PUBLIC(void) MSG_task_set_priority(m_task_t task, double priority);
XBT_PUBLIC(int) MSG_task_Iprobe(m_channel_t channel);
-XBT_PUBLIC(int) MSG_task_probe_from(m_channel_t channel);
+XBT_PUBLIC(long int) MSG_task_probe_from(m_channel_t channel);
XBT_PUBLIC(int) MSG_task_probe_from_host(int channel, m_host_t host);
XBT_PUBLIC(MSG_error_t) MSG_channel_select_from(m_channel_t channel, double max_duration,
- int *PID);
+ long int *PID);
XBT_PUBLIC(MSG_error_t) MSG_process_sleep(double nb_sec);
XBT_PUBLIC(MSG_error_t) MSG_get_errno(void);
* number means no reset and a positive number will be used to set the PID
* of the next newly created process.
*/
-int MSG_process_killall(int reset_PIDs)
+int MSG_process_killall(long int reset_PIDs)
{
m_process_t p = NULL;
m_process_t self = MSG_process_self();
number of channels fixed with MSG_set_channel_number().
* \return -1 if there is no pending communication and the PID of the process who sent it otherwise
*/
-int MSG_task_probe_from(m_channel_t channel)
+long int MSG_task_probe_from(m_channel_t channel)
{
m_host_t h = NULL;
xbt_fifo_item_t item;
and #MSG_OK otherwise.
*/
MSG_error_t MSG_channel_select_from(m_channel_t channel, double max_duration,
- int *PID)
+ long int *PID)
{
m_host_t h = NULL;
simdata_host_t h_simdata = NULL;
{
simdata_process_t p_simdata = process->simdata;
- DEBUG3("Killing %s(%d) on %s",process->name, p_simdata->PID, p_simdata->host->name);
+ DEBUG3("Killing %s(%ld) on %s",process->name, p_simdata->PID, p_simdata->host->name);
if(p_simdata->waiting_task) {
DEBUG1("Canceling waiting task %s",p_simdata->waiting_task->name);
whose PID is equal to \a PID. If no host is found, \c NULL is returned.
Note that the PID are uniq in the whole simulation, not only on a given host.
*/
-m_process_t MSG_process_from_PID(int PID)
+m_process_t MSG_process_from_PID(long int PID)
{
xbt_fifo_item_t i = NULL;
m_process_t process = NULL;
* This functions checks whether \a process is a valid pointer or not
and return its PID.
*/
-int MSG_process_get_PID(m_process_t process)
+long int MSG_process_get_PID(m_process_t process)
{
xbt_assert0(((process != NULL) && (process->simdata)), "Invalid parameters");
and return its PID. Returns -1 if the agent has not been created by
another agent.
*/
-int MSG_process_get_PPID(m_process_t process)
+long int MSG_process_get_PPID(m_process_t process)
{
xbt_assert0(((process != NULL) && (process->simdata)), "Invalid parameters");
*
* This functions returns the PID of the currently running #m_process_t.
*/
-int MSG_process_self_PID(void)
+long int MSG_process_self_PID(void)
{
return (MSG_process_get_PID(MSG_process_self()));
}
* This functions returns the PID of the parent of the currently
* running #m_process_t.
*/
-int MSG_process_self_PPID(void)
+long int MSG_process_self_PPID(void)
{
return (MSG_process_get_PPID(MSG_process_self()));
}
typedef struct simdata_process {
m_host_t host; /* the host on which the process is running */
smx_process_t smx_process;
- int PID; /* used for debugging purposes */
- int PPID; /* The parent PID */
+ long int PID; /* used for debugging purposes */
+ long int PPID; /* The parent PID */
m_host_t put_host; /* used for debugging purposes */
m_channel_t put_channel; /* used for debugging purposes */
m_task_t waiting_task;