// Remove removes a process from global list.
// It returns true if the process is found and removed by given pid.
359139
func Remove(pid int64) bool {
	counter.Lock()
	defer counter.Unlock()

	for i := range Processes {
		if Processes[i].PID == pid {
			Processes = append(Processes[:i], Processes[i+1:]...)
			return true
		}
	}
	return false
}
823342
func (s *Service) Remove() error {
	installed, err := s.Installed()
	if err != nil {
		return errors.Trace(err)
	}
	if !installed {
		return nil
	}
	return os.Remove(s.confPath())
}
1226146
func (c *ARC) Remove(key interface{}) bool {
	c.mu.Lock()
	defer c.mu.Unlock()

	return c.remove(key)
}
497851
func (c *Container) remove(v uint16) (removed bool) {
	if c.isArray() {
		removed = c.arrayRemove(v)
	} else if c.isRun() {
		removed = c.runRemove(v)
	} else {
		removed = c.bitmapRemove(v)
	}
	return removed
}
776256
func (p *Prque) Remove(i int) interface{} {
	if i < 0 {
		return nil
	}
	return heap.Remove(p.cont, i)
}
287296
func (p *Project) Remove(c *check.C, containerID string) {
	c.Assert(p.project.Remove(containerID), check.IsNil,
		check.Commentf("error while removing the container %s", containerID))
}
331269
func (e *ExecRunner) Remove(f assets.CopyableFile) error {
	targetPath := filepath.Join(f.GetTargetDir(), f.GetTargetName())
	return os.Remove(targetPath)
}
530954
func (l *List) Remove(e *Element) interface{} {
	if e.list == l {
		// if e.list == l, l must have been initialized when e was inserted
		// in l or l == nil (e is a zero Element) and l.remove will crash
		l.remove(e)
	}
	return e.Value
}
829194
func (s *Settings) Remove(d string) error {
	_, err := os.Stat(d)
	if !os.IsNotExist(err) {
		return os.RemoveAll(d)
	}
	return err
}
529565
func (l *List) Remove() error {
	// Remove the table
	_, err := l.host.db.Exec("DROP TABLE " + l.table)
	return err
}
516760
func (i *IndexedGCAllocPQ) Remove(allocID string) *GCAlloc {
	i.pqLock.Lock()
	defer i.pqLock.Unlock()

	if gcAlloc, ok := i.index[allocID]; ok {
		heap.Remove(&i.heap, gcAlloc.index)
		delete(i.index, allocID)
		return gcAlloc
	}

	return nil
}
1182720
func (e *Store) Delete(id string, pid int) {
	e.Lock()
	delete(e.byID, id)
	e.Unlock()
}
1188716
func (l *PacketList) Remove(e *PacketElement) Packet {
	if e.list == l {
		// if e.list == l, l must have been initialized when e was inserted
		// in l or l == nil (e is a zero Element) and l.remove will crash
		l.remove(e)
	}
	return e.Value
}
147478
func (p *Pubring) Remove(id string) error {
	p.Lock()
	defer p.Unlock()

	match := -1
	for i, pk := range p.data.PublicKeys {
		if pk.Fingerprint == id {
			match = i
			break
		}
	}
	if match < 0 || match > len(p.data.PublicKeys) {
		return fmt.Errorf("not found")
	}
	p.data.PublicKeys = append(p.data.PublicKeys[:match], p.data.PublicKeys[match+1:]...)
	return nil
}
852205
func (l *List) Remove(e Element) {
	prev := ElementMapper{}.linkerFor(e).Prev()
	next := ElementMapper{}.linkerFor(e).Next()

	if prev != nil {
		ElementMapper{}.linkerFor(prev).SetNext(next)
	} else {
		l.head = next
	}

	if next != nil {
		ElementMapper{}.linkerFor(next).SetPrev(prev)
	} else {
		l.tail = prev
	}
}
899609
func (c Counter) Remove() {
	gm.Lock()
	defer gm.Unlock()

	cm.Lock()
	defer cm.Unlock()

	delete(counters, string(c))
	delete(counterFuncs, string(c))
	delete(inits, string(c))
}
691801
func (s *GRPCStorage) Remove(ctx context.Context, fn *FileNameMsg) (*google_protobuf.Empty, error) {
	return &google_protobuf.Empty{}, s.backend.Remove(fn.FileName)
}