| | 1863 | | tm_mca(tp, mp) | | | 1864 | | struct task *tp; | | | 1865 | | struct pmsg *mp; | | | 1866 | | { | | | 1867 | | struct mca *mcap; | | | 1868 | | int ndst; | | | 1869 | | int *dsts; | | | 1870 | | int tid; | | | 1871 | | int i, j; | | | 1872 | | | | | 1873 | | | | | 1874 | | | | | 1875 | | | | | 1876 | | | | | 1877 | | | | | 1878 | | mcap = mca_new(); | | | 1879 | | mcap->mc_tid = TIDGID | tp->t_tid;
| | | 1880 | | upkint(mp, &ndst); | | true | 1881 | | dsts = TALLOC(ndst, int, "dsts");
| | | 1882 | | for ( i=0, j=0 ; i < ndst ; i++ ) { | | | 1883 | | upkuint(mp, &tid); | | | 1884 | | if ((tid & tidhmask) == myhostpart || tidtohost(hosts, tid)) | | | 1885 | | dsts[j++] = tid; | | | 1886 | | } | | | 1887 | | ndst = j; | | | 1888 | | | | | 1889 | | if (ndst < 1) | | | 1890 | | goto noguys; | | | 1891 | | | | | 1892 | | | | | 1893 | | | | | 1894 | | | | | 1895 | | | | | 1896 | | | | | 1897 | | mcap->mc_dsts = TALLOC(ndst, int, "mcal");
| | | 1898 | | mcap->mc_ndst = 0; | | | 1899 | | | | | 1900 | | for (j = 0; j < ndst; ) { | | | | | ... | | | 1905 | | mp->m_dst = (tid |= TIDPVMD);
| | | 1906 | | mp->m_tag = DM_MCA;
| | | 1907 | | pkint(mp, mcap->mc_tid); | | | 1908 | | pkint(mp, j - i); | | | 1909 | | while (i < j) | | | 1910 | | pkint(mp, dsts[i++]); | | | 1911 | | sendmessage(mp); | | | 1912 | | mcap->mc_dsts[mcap->mc_ndst++] = tid; | | | 1913 | | } | | | 1914 | | | | | 1915 | | noguys: | | dsts <= 4095 | 1916 | | PVM_FREE(dsts);
|
|